openapi: 3.0.0 info: description: This document describes interaction with CoinAPI by using HTTP requests. version: 1.0.0 title: CoinAPI Interface contact: name: Help via Discord Chat url: 'https://chat.wrkz.work' license: name: GNU General Public License version 3 url: 'https://opensource.org/licenses/GPL-3.0' tags: - name: General Information - name: Private Query externalDocs: description: The WrkzCoin GitHub Organization url: 'https://github.com/WrkzCoin' servers: - url: 'https://coinapi.wrkz.work' paths: /info: get: summary: Retrieves information regarding the current status of the platform tags: - General Information responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Info' '400': $ref: '#/components/responses/BadRequest' '500': $ref: '#/components/responses/InternalError' '/info/{coin}': get: summary: Retrieves information regarding a specific coin information and its status parameters: - name: coin description: Supported coin name by CoinAPI in: path required: true schema: type: string tags: - General Information responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Info.Coin' '400': $ref: '#/components/responses/BadRequest' '500': $ref: '#/components/responses/InternalError' /balances: get: summary: Get the balance for every coin tags: - Private Query responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Balances' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/InternalError' '/balances/{coin}': get: summary: Get the balance for a selected coin parameters: - name: coin description: Supported coin name by CoinAPI in: path required: true schema: type: string tags: - Private Query responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Balance.Coin' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/InternalError' /deposits: get: summary: Get a list of deposit addresses tags: - Private Query responses: '200': description: The operation completed successfully. content: application/json: schema: type: object properties: addresses: type: array items: properties: coin: type: string example: WRKZ address: type: string example: WrkzhgkBTzSMSiLqfSSe3t7irHdgvE3jxTh4CMJR6vUzWY9eartiFudXzGFf56MVtAdFqJTXBaMsjScCMnMxKpY39Hx12SHM18 '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/InternalError' '/deposits/{coin}': get: summary: Retrieves a deposit address (or with paymentID) of a selected coin parameters: - name: coin description: Supported coin name by CoinAPI in: path required: true schema: type: string tags: - Private Query responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Deposit.Coin' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/InternalError' /transactions: get: summary: Gets a list of all your transactions tags: - Private Query responses: '200': description: The operation completed successfully. content: application/json: schema: type: object properties: transactions: type: array items: properties: coin: type: string example: WRKZ realAmount: type: number format: float example: 1222.11 txInOut: type: string example: IN timestamp: type: number format: uint64 example: 1593755048 txHash: type: string example: e1d1708223e653ee0b9344ff5618eafe19d945f39fa9176caba9f1a8ab8352af '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/InternalError' '/transactions/{coin}': get: summary: Gets a list of all your transactions of a selected coin parameters: - name: coin description: Supported coin name by CoinAPI in: path required: true schema: type: string tags: - Private Query responses: '200': description: The operation completed successfully. content: application/json: schema: type: object properties: transactions: type: array items: properties: coin: type: string example: BTCMZ realAmount: type: number format: float example: 111.11 txInOut: type: string example: IN timestamp: type: number format: uint64 example: 1593755000 txHash: type: string example: 036806e194ee49b9540d4ffecfb525c6d038675e1a5e25b8bc4d390692bbfcb9 '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/InternalError' /transactions/send: post: summary: Sending a transaction through coin network tags: - Private Query requestBody: required: true content: application/json: schema: type: object required: - coin - address - realAmount properties: coin: type: string description: Name of a supported coin in CoinAPI example: WRKZ address: type: string description: The address to send fund to example: >- WrkzRNDQDwFCBynKPc459v3LDa1gEGzG3j962tMUBko1fw9xgdaS9mNiGMgA9s1q7hS1Z8SGRVWzcGc8Sh8xsvfZ6u2wJEtoZB realAmount: type: number format: float description: The amount of WRKZ to send (in real units) example: 1234.56 paymentID: type: string description: The payment ID to use (if supported by a coin) example: >- 38a8224a4c8bc5f060555cf9e89551dcd0cbb1c587a52b63e98f71280c362ee4 responses: '201': description: The operation completed successfully. content: application/json: schema: type: object properties: coin: type: string example: WRKZ transactionHash: type: string example: >- 396e2a782c9ce9993982c6f93e305b05306d0e5794f57157fbac78581443c55f Fee: type: number format: float example: 10.12 '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/InternalError' components: responses: NotFound: description: The specified resource was not found content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: A parse error occured, or an error occured processing your request. content: application/json: schema: $ref: '#/components/schemas/Error' InternalError: description: An exception was thrown whilst processing the request. See the console for logs. Please report. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' schemas: # Schema for error response body Error: type: object properties: errorCode: type: integer errorMessage: type: string required: - errorCode - errorMessage Info: properties: status: type: string description: The status of CoinAPI example: OK numberCoins: type: number description: Total number of coins in CoinAPI platform example: 18 depositStatus: type: boolean description: If depositing system is enable or not example: true withdrawStatus: type: boolean description: If withdrawing system is enable or not example: true version: type: string description: The current CoinAPI version number (X.Y.Z) example: 1.0.0 Info.Coin: properties: coin: type: string description: Name of a coin in CoinAPI example: WRKZ decimal: type: number description: Decimal number of a coin example: 100 height: type: number description: Height of a coin network example: 12345 isMaintenance: type: boolean description: if coin is under maintenance example: false depositStatus: type: boolean description: If depositing is enable or not by CoinAPI example: true withdrawStatus: type: boolean description: If withdrawing is enable or not by CoinAPI example: false maxWithdraw: type: number description: Maximum amount of withdraw limit (real amount) example: 1000000 minWithdraw: type: number description: Minimum amount for withdraw (real amount) example: 100 dailyWithdraw: type: number description: Number of withdraw limit per last 24h. example: 200 Balances: properties: balances: type: array items: properties: coin: type: string description: Coin name example: WRKZ balance: type: number format: float description: Real balance example: 1111.22 Balance.Coin: properties: coin: type: string description: Name of a coin in CoinAPI example: WRKZ balance: type: number format: float description: Coin balance example: 111.22 Deposit.Coin: properties: coin: type: string description: Name of a coin in CoinAPI example: WRKZ address: type: string description: Deposit address example: WrkzX4tqFta94noaGMay6k9bcAdeNZ6Gj9mM3dkSL85SHHuJkk24mV59w3HG2oSVhAAEdYCjPpaoX9G3eNNdpQsn9RkiRvwUETdHwjPjiY5f71HHMCxNWTgbFV5fr4t5HJoTYoBiYs6udNdG5cGknVnHaUDgYqXqfxqJ4ibLQw72fAkt6cPrwJpMv9 timestamp: type: number format: uint64 description: Timestamp of generated address example: 1593757876