The CryptoBank API allows you to integrate the CryptoBank trading platform with third party applications, such as trading applications. Below you will find details on how the system functions, along with examples in common programming languages.
The authentication procedure is as follows:
Api Access URL : {method}
payload = parameters-object -> JSON encode -> base64
signature = HMAC-SHA384(payload, api-secret)
send (api-key, payload, signature)
These are encoded as HTTP headers named:
In order to access the parts of the API which require authentication, you must generate an API key and an API secret using this page
You can generate as many API keys as you would like, and each of those keys can be customised in a few ways.
In order to access the parts of the API which require authentication, you must generate an API key and an API secret using this page
You can generate as many API keys as you would like, and each of those keys can be customised in a few ways.
We return decimal numbers as strings to preserve full precision across platforms. We recommend you also convert your numbers to string in order to avoid undesired consequences from precision and truncation errors.
All examples assume the following:
POST GetBalance
Return information for a specific balance
Parameters:
Currency: The currency of the balance to return e.g. 'BTC' (required)
Request Reponse:{"currency":"BTC"}
{ "status":"true", "message":"null", "result":{ "currency":"BTC", "currencyLong":"Bitcoin", "Avaliable":"100.00000000", "PendingWithdraw":0, "Address":"3FW5B9hNp6aHN4bdvFAExwJcyRhmZnre8K" } }
POST GetBalances
Return information for a all balance
Parameters:None
Request Reponse:Empty
{ "status":"true", "message":"null", "result":{ { "currency":"ETH", "currencyLong":"Ethereum", "Avaliable":"1230.00000000", "PendingWithdraw":0, "Address":"0x30787a97c500235bdc5e912efb710e60e4adff55" }, { "currency":"LTC", "currencyLong":"Litecoin", "Avaliable":"01.00234100", "PendingWithdraw":0, "Address":"MPNifz2yLJJSKnirovRcaPa3gxyeBqh1vg" }, { "currency":"BCHABC", "currencyLong":"Bitcoin Cash", "Avaliable":"150.31200000", "PendingWithdraw":0, "Address":"qpm45uykgpgcjjvgx07h6mrndnsran6ccgweyrv659" } } }
POST GetOrder
Parameters:
OrderId: The order to return (required)
Request Reponse:{"tradeId":"67"}
{ "status": "true", "message": "null", "result": { "Id": "67", "Market": "SFCP_BTC", "Type": "Sell", "Amount": "495.00000000", "Total": "0.01413720", "Status": "partially", "Timestamp": "2019-01-13 11:16:12", "IsApi": "true" } }
POST GetOrders
Parameters:
Market: The market name e.g. 'SFCP_BTC' (optional, default: 'all')
Count: The max amount of records to return (optional, default: 20)
Request Reponse:{"tradePair":"SFCP_BTC"}
{ "status": "true", "message": "null", "result": [ { "Id": 1105, "Market": "SFCP_BTC", "Type": "Sell", "Amount": "900.00000000", "Total": "0.01857600", "Status": "partially", "Timestamp": "2019-01-22 05:17:17", "IsApi": "true" }, { "Id": 67, "Market": "SFCP_BTC", "Type": "Sell", "Amount": "495.00000000", "Total": "0.01413720", "Status": "partially", "Timestamp": "2019-01-13 11:16:12", "IsApi": "true" } ] }
POST Getmyorder
Parameters:
Market: The market name e.g. 'SFCP_BTC' (optional, default: 'all')
Count: The max amount of records to return (optional, default: 20)
Request Reponse:{"tradePair":"SFCP_BTC"}
{ "status": "true", "message": "null", "result": [ { "Id": 1105, "Market": "SFCP_BTC", "Type": "Sell", "Amount": "900.00000000", "Total": "0.01857600", "Status": "partially", "Timestamp": "2019-01-22 05:17:17", "IsApi": "true" }, { "Id": 67, "Market": "SFCP_BTC", "Type": "Sell", "Amount": "495.00000000", "Total": "0.01413720", "Status": "partially", "Timestamp": "2019-01-13 11:16:12", "IsApi": "true" } ] }
POST SubmitOrder
Parameters:
Market: The market name e.g. 'SFCP_BTC' (required)
Type: The order book type 'buy', 'sell' (required)
Order Type: The order type 'Instant (0)', 'Limit(1)','Stop(2)','Stop-Limit(3)' (required)
Amount: The amount to buy/sell (required)
Price: The price to buy/sell for (required)
Limit Price: The Limit price to buy/sell for Optional (required)
Request Reponse:{"type": "Buy","order_type": "1","pair": "SFCP/BTC","amount": "1","price": "1","limitprice": "0"}
{ "status": "true", "message": "null", "result": { "status": "1", "msg": "buy_order_place_successfully", "OrderId": 1268 } }
POST CancelOrder
Parameters:
Trade ID: The Trade ID e.g. '234' (required)
Request Reponse:{"tradeId": "133"}
{ "status": "true", "message": "null", "result": { "status": "1", "msg": "buy_order_place_successfully", "OrderId": 1268 } }
POST GenerateAddress
Return information for a all balance
Parameters:The currency to generate address for e.g. 'BTC'(required)
Request Reponse:{"currency":"BTC"}
{ "success":true, "message":null, "result": { "Currency": "BTC", "Address": "3KBUuGko4H5ke7EVsq9B7PLK1c5Askdd7y", // only for CryptoNight coins like (BTC,USDT,LTC,SFCP) etc. } }
POST GetDeposits
Return information for a all balance
Parameters:
Currency: The currency name e.g. 'BTC' (optional, default: 'all')
count: The max amount of records to return (optional, default: 20)
Request Reponse:{"currency":"BTC"}
{ "success":true, "message":null, "result": [{ "Id": "436436", "Currency": "BTC", "CurrencyLong": "Bitcoin", "Amount": 100.00000000, "Status": "Pending", "Txid": "9281eacaad58335b884adc24be884c00200a4fc17b2e05c72e255976223de187", "Confirmations": 0, "Timestamp": "2015-12-07T20:04:05.3947572" },{ "Id": "436437", "Currency": "BTC", "CurrencyLong": "Bitcoin", "Amount": 100.00000000, "Status": "Confirmed", "Txid": "6ddbaca454c97ba4e8a87a1cb49fa5ceace80b89eaced84b46a8f52c2b8c8ca3", "Confirmations": 12, "Timestamp": "2015-12-07T20:04:05.3947572" } ] }
POST GetWithdraws
Return information for a all balance
Parameters:
Currency: The currency name e.g. 'BTC' (optional, default: 'all')
count: The max amount of records to return (optional, default: 20)
Request Reponse:{"currency":"BTC"}
{ "success":true, "message":null, "result": [{ "Id": "436436", "Currency": "BTC", "CurrencyLong": "Bitcoin", "Amount": 100.00000000, "Status": "Pending", "Txid": "9281eacaad58335b884adc24be884c00200a4fc17b2e05c72e255976223de187", "Confirmations": 0, "Timestamp": "2015-12-07T20:04:05.3947572" },{ "Id": "436437", "Currency": "BTC", "CurrencyLong": "Bitcoin", "Amount": 100.00000000, "Status": "Confirmed", "Txid": "6ddbaca454c97ba4e8a87a1cb49fa5ceace80b89eaced84b46a8f52c2b8c8ca3", "Confirmations": 12, "Timestamp": "2015-12-07T20:04:05.3947572" } ] }
POST SubmitFiatDeposit
Parameters:
Amount: The amount (required)
Currency: The currency (required)
transaction_ref: The transaction_ref(required)
proof: The proof optional(required)
Request Reponse:{"currency": "USD","transaction_ref": "ec41b8cd29a70d652acd79e428e8","amount": "1","proof": ""}
{ "status": "true", "message": "null", "result": { "status": "1", "msg": "buy_order_place_successfully", "OrderId": 1268 } }
GET GetCurrency
Parameters:
Symbol: The currency symbol to return e.g. 'BTC' (required)
{ "success":true, "message":null, "result":[ { "currency":"BTC", "currencyLong":"Bitcoin", "status":"OK" } ] }
GET GetCurrencies
Parameters: None
{ "success":true, "message":null, "result":[ { "currency":"THB", "currencyLong":"Thai Baht", "status":"OK" }, { "currency":"LAK", "currencyLong":"Lao Kips", "status":"OK" }, ] }
GET GetTradePairs
Returns a list of all available currency pairings, including their "pairlist" which is required for some API calls. Will also include the minimum order amount for primary and secondary currency in each pairing market.
Parameters: None
{ "success": 1, "message": success, "pairlist": [ { "SFCP_BTC", "ETH_BTC", "LTC_BTC", "DOGE_BTC", "ETC_BTC", "LTC_USDT", "ETH_USDT", "BTC_USDT", "SFCP_USDT", "XRP_USDT", "DOGE_SFCP", "LTC_SFCP", "ETH_SFCP", "XRP_SFCP", "BCHABC_SFCP", "ETC_SFCP", "XLM_SFCP", "USD_SFCP", "NEO_SFCP", "XRP_BTC", "THB_SFCP", "LAK_SFCP", "BTC_SFCP" } ] }
GET GetTicker
Parameters:
Market: The market name e.g. 'SFCP_BTC' (required)
{ "success":true, "message":null, "result":[ { "bid":"0.00001815", "ask":"0.00001900", "market":"SFCP_BTC" } ] }
GET GetMarketStatus
Parameters:
Market: The market name e.g. 'SFCP_BTC' (required)
{ "success":true, "message":null, "result":[ { "marketStatus":"OK", "market":"SFCP_BTC" } ] }
GET GetMarketHistory
Parameters:
Market: The market name e.g. 'SFCP_BTC' (required)
Count: The max amount of records to return (optional, default: 20)
{ "success":true, "message":null, "result":[ { "pair":"SFCP_BTC", "id":"1", "timeStamp":"2019-01-23 16:27:14", "quantity":"54.65170193", "price":"0.00001915", "orderType":"Buy", "total":"0.00104658" }, { "pair":"SFCP_BTC", "id":"2", "timeStamp":"2019-01-23 16:27:14", "quantity":"500.00000000", "price":"0.00001910", "orderType":"Buy", "total":"0.00955000" }, { "pair":"SFCP_BTC", "id":"3", "timeStamp":"2019-01-23 16:27:14", "quantity":"500.00000000", "price":"0.00001909", "orderType":"Buy", "total":"0.00954500" } ] }
GET GetMarketHistories
Parameters:None
{ "success":true, "message":null, "result":[ { "pair":"SFCP_BTC", "id":"1", "timeStamp":"2019-01-23 16:27:14", "quantity":"54.65170193", "price":"0.00001915", "orderType":"Buy", "total":"0.00104658" }, { "pair":"ETH_BTC", "id":"2", "timeStamp":"2019-01-23 16:27:14", "quantity":"500.00000000", "price":"0.00001910", "orderType":"Buy", "total":"0.00955000" }, { "pair":"XRP_BTC", "id":"3", "timeStamp":"2019-01-23 16:27:14", "quantity":"500.00000000", "price":"0.00001909", "orderType":"Sell", "total":"0.00954500" } ] }
GET GetMarketSummary
Parameters:
Market: The market name e.g. 'SFCP_BTC' (required)
{ "success":true, "message":null, "result":[ { "market":"SFCP_BTC", "high":null, "low":"0.00", "volume":"", "baseVolume":"", "last":[ { "Price":"0.00001915" } ], "bid":"0.00001900", "ask":"0.00001815", "openBuyOrders":20, "openSellOrders":42 } ] }
GET GetMarketSummaries
Parameters:None
{ "success":true, "message":null, "result":[ { "market":"SFCP_BTC", "high":null, "low":"0.00", "volume":"", "baseVolume":"", "last":[ { "Price":"0.00001915" } ], "bid":"0.00001900", "ask":"0.00001815", "openBuyOrders":20, "openSellOrders":42 }, { "market":"ETH_BTC", "high":null, "low":"0.00", "volume":"", "baseVolume":"", "last":[ ], "bid":"7.00000000", "ask":"6.00000000", "openBuyOrders":1, "openSellOrders":1 }, { "market":"LTC_BTC", "high":null, "low":"0.00", "volume":"", "baseVolume":"", "last":[ ], "bid":"7.00000000", "ask":"6.00000000", "openBuyOrders":1, "openSellOrders":1 } ] }
GET Order Books
Return the market depth including ask and bid orders.
Replace [CURR_A] and [CURR_B] with the selected currencies.
URL: https://cryptobanksf.com/api/orderbook/SFCP_BTC
{ "success":true, "message":null, "pair":"SFCP_BTC", "asks":[ { "price":"0.00001820", "amount":"284.29839560" }, { "price":"0.00001815", "amount":"300.00000000" }, { "price":"0.00001600", "amount":"360.00000000" } ], "bids":[ { "price":"0.00001990", "amount":"966.33924021" }, { "price":"0.10000000", "amount":"100.00000000" } ] }
Copyright© -2018 All rights reserved.