`.. include:: .special.rst

Blockchain Endpoints

List all token

GET /api/token/list-all-token

Response

{
  "status": 200,
  "tokens": [
    {
      "id": 1,
      "name": "Bitcoin",
      "symbol": "BTC",
      "volume": 0,
      "volume24h": 0,
      "createdAt": 1533530259,
      "updatedAt": 1575642089,
      "coinBase": true,
      "estimateBtc": 1,
      "priceUsd": 7814.44,
      "markPriceBtc": 1,
      "typeValue": null,
      "change24h": 0,
      "cmcId": 1,
      "defaultTradingPair": "USDT_BTC",
      "status": true,
      "statusDeposit": true,
      "statusWithdraw": true,
      "blockchains": [
        {
          "id": 1,
          "symbol": "BTC",
          "blockchainId": "BTC",
          "blockchainName": "Bitcoin",
          "isDefault": true,
          "status": true,
          "statusDeposit": true,
          "statusWithdraw": true,
          "confirmation": 2,
          "urlCheckAddress": "https://blockchain.info/address/",
          "urlCheckTxid": "https://blockchain.info/tx/",
          "memoName": "",
          "depositType": 1,
          "withdrawType": 1,
          "withdrawFee": 0.0005,
          "withdrawFeePercent": null,
          "withdrawFeeMax": null,
          "createdAt": 1533530259,
          "updatedAt": 1563121678
        }
      ]
    }
  ]
}

Get token

GET /api/token/get-token

Body:

Key Mandatory Data type Description Example
symbol required string Coin symbol MCASH

Response

{
  "status": 200,
  "data": {
    "id": 1,
    "name": "Bitcoin",
    "symbol": "BTC",
    "volume": 0,
    "volume24h": 0,
    "createdAt": 1533530259,
    "updatedAt": 1575642089,
    "coinBase": true,
    "estimateBtc": 1,
    "priceUsd": 7814.44,
    "markPriceBtc": 1,
    "typeValue": null,
    "change24h": 0,
    "cmcId": 1,
    "defaultTradingPair": "USDT_BTC",
    "status": true,
    "statusDeposit": true,
    "statusWithdraw": true,
    "blockchains": [
      {
        "id": 1,
        "symbol": "BTC",
        "blockchainId": "BTC",
        "blockchainName": "Bitcoin",
        "isDefault": true,
        "status": true,
        "statusDeposit": true,
        "statusWithdraw": true,
        "confirmation": 2,
        "urlCheckAddress": "https://blockchain.info/address/",
        "urlCheckTxid": "https://blockchain.info/tx/",
        "memoName": "",
        "depositType": 1,
        "withdrawType": 1,
        "withdrawFee": 0.0005,
        "withdrawFeePercent": null,
        "withdrawFeeMax": null,
        "createdAt": 1533530259,
        "updatedAt": 1563121678
      }
    ]
  }
}

List token blockchain

GET /api/token-blockchain/list-token-blockchain

Body:

Key Mandatory Data type Description Example
symbol option string Coin symbol BTC, USDT, …
blockchain_id option string Blockchain ID (Support multi-chain) OMNI, ETH
status option 1/0 Enable/Disable (1/0) 1

Response

{
  "status": 200,
  "data": [
    {
      "id": 1,
      "symbol": "BTC",
      "blockchainId": "BTC",
      "blockchainName": "Bitcoin",
      "isDefault": true,
      "status": true,
      "statusDeposit": true,
      "statusWithdraw": true,
      "confirmation": 2,
      "urlCheckAddress": "https://blockchain.info/address/",
      "urlCheckTxid": "https://blockchain.info/tx/",
      "memoName": "",
      "depositType": 1,
      "withdrawType": 1,
      "withdrawFee": 0.0005,
      "withdrawFeePercent": null,
      "withdrawFeeMax": null,
      "createdAt": 1533530259,
      "updatedAt": 1563121678
    }
  ]
}

Get deposit address

GET /api/balance/get-address-by-symbol

Parameters

Key Mandatory Data type Description Example
symbol required string Coin symbol MAS
blockchain_id option string Blockchain ID (Support multi-chain) OMNI, ETH

Headers

Key Mandatory Data type Description Example
api-key required string get api-key from profile page 78HUdkjile0_kds045-dftk5mefjid3g

Example:

https://api.vinex.network/api/balance/get-address-by-symbol?symbol=MAS

Response

{
    "status": 200,
    "data": {
        "address": "6nrxbwKAwnhhV+xRjO+SL+wFKfBphQGg",
        "depositType": 2,
        "metadata": {
            "messageId": "11710438eb494dfaa4a428942daef851",
            "decimals": "92638865"
        },
        "tokenId": 3000006
    }
}

Response Description:

Key Mandatory Data type Description
address required string Deposit address
metadata required object This would be describe deposit type and its attribute

Deposit types:

  1. Default (Ex. BTC).
  2. Message ID: Same address for all users. Must be include messageId on deposit request (Ex. MCASH).
depositType = 2
metadata.messageId = 'unique string'

Decimals type: Same address for all users. Deposit request will be identified by decimals (Ex. XDAG).

depositType = 2
metadata.decimals = 'unique decimals string'
  1. Transaction File: Deposit address is in a file.
depositType = 3
metadata.file = 'file content'
  1. Share Transaction Id: Same address for all user. Must submit shared transactionID back (Ex. XBG).
  2. Address change: Deposit addresses should not be used more than once (Ex. IOTA).

Create withdrawal

POST /api/v2/create-withdrawal

Body:

Key Mandatory Data type Description Example
symbol required string Coin symbol BTC, USDT, …
blockchain_id option string Blockchain ID (Support multi-chain) OMNI, ETH
amount required double Withdrawal amount 10
address required string Withdrawal address 0x4fed1fc4144c223ae3c1553be203cdfcbd38c581
memo option string Memo de7fa5d66cb9
time_stamp required long Time stamp to synchronize with server time (second) 1539703961
recv_window option int Delta delay time with server. Default 5 seconds. 5

Headers

Key Description Example
api-key Get api-key from profile page 78HUdkjile0_kds045-dftk5mefjid3g
signature signature = hmac256(secret_key, <address>_<amount>_<blockchain_id>_<recv_window>_<symbol>_<time_stamp>) 9759cf926a0f65e59da604d9ea0537ca94d0084cbd741aeba5d9a5cedee7ab6d

Response

{
    "status": 200,
    "data": "Success, please wait process!"
}