FAQ for API Users
Modified on Wed, 25 Sep at 11:31 AM
There are 8 categories for this Q&A. You can click the link below to jump to each topic.
- 1. API
- 2. Error codes
- 3. WebSocket
- 4. Servers and connection
- 5. Orders, markets, trading, and transactions related
- 6. Account and daily limit
- 7. Fee credits
- 8. Others
1. API
No. | FAQ | Answer |
1 | What is the API rate limit? | Rate limit is the limit of how frequently an API user can send the requests within a specific timeframe. For more information, please visit the following sites: |
2 | Do users get the message alert when their API gets blocked? | Yes. The error message is {“error”:30}. |
3 | How does Bitkub calculate the amount of the API rate limits: by accounts, by IP address, or by API key? | Currently, we calculate the rate limit by user. Per IP includes whitelist API key and non-whitelist. |
4 | Is the test market supported? | No, we do not have the test market at the moment. However, we do have the bid and ask tests. (https://github.com/bitkub/bitkub-official-api-docs/blob/master/restful-api.md#post-apimarketplace-bidtest, and https://github.com/bitkub/bitkub-official-api-docs/blob/master/restful-api.md#post-apimarketplace-asktest) |
5 | Is "amend order" supported or do users have to cancel and place a new order? | Currently, an amend order is not supported; users will have to cancel and place a new order by themselves. |
6 | Is "cancel-on-disconnect" or "dead man's switch" supported in case of network disconnection? | No, we do not support this function at the moment. |
7 | Does Bitkub have any official sample code for documentation? | We have our API documented here: https://github.com/bitkub/bitkub-official-api-docs. In this API document, users can also find a sample code and other useful information. |
8 | What is the fastest way to get market data information from Bitkub? | We have bitkub-official-api-docs/websocket-api.md at master · bitkub/bitkub-official-api-docs. Users can also use the REST API. |
9 | How can users get balance for high-frequency trading? | We recommend using the REST API market wallet because it returns available + reserved balances (bitkub-official-api-docs/restful-api.md at master · bitkub/bitkub-official-api-docs). We have 2 API endpoints that can be used for this case (users need to refresh or request API to check the balance): 1. /api/v3/market/wallet : To check THB and token balances at the moment of request. 2. /api/v3/market/balances : To check THB balance, token balance, and in-order/reserved tokens at the moment of request. |
10 | Can fee credit be used via Public API? | No |
11 | What is the format of Bitkub's server time? | You can check our server time at https://github.com/bitkub/bitkub-official-api-docs/blob/master/restful-api.md#get-apiservertime. You can also use: GET/api/v3/servertime https://github.com/bitkub/bitkub-official-api-docs/blob/master/restful-api.md#get-apiv3servertime. The response is in Epoch time, and the number must be converted on this website: https://www.epochconverter.com/. |
12 | What should users do if they see a misleading API balance? | When users see a misleading API balance, they should request the CSV file. |
13 | What network value do we assign for all withdrawals? (If not, users will get the “ERROR CODE 10”.) | “ERROR CODE 10” code appears when some required parameters are missing when using our endpoints. Users can check the details of required parameters for each endpoint at Github doc (Query or Body) e.g. https://github.com/bitkub/bitkub-official-api-docs/blob/master/restful-api.md#query-15. More examples of required parameters are listed below.
|
14 | What causes the cancellation error? | A cancellation error can happen when a user submits "request to cancel order" at the same time when our system is still processing the "place order request". As a result, our system cannot cancel the order that does not yet exist in our order book. We could also say that the speed of user's trading system does not match the exchange's. |
15 | Why is the user's buyer/user seller tag not working? | This feature is temporarily disabled. |
16 | Is there any other endpoint where users can specify the amount of tokens instead of the amount of THB? | No, we do not have API for only token amount at the moment. However, we have 2 API endpoints that relate to the question as follows: 1. /api/v3/market/wallet 2. /api/v3/market/balances (See additional information in question No. 9 or check our endpoints information at https://github.com/bitkub/bitkub-official-api-docs.) |
17 | Does Bitkub have a place-bid-by-crypto? | No |
18 | How can users track via API or another process if their orders became makers or taker historically? | According to the reference, POST/api/market/my-order-history will show the result that orders became maker or taker:
|
19 | How long does it take to synchronize transactions for endpoint "my-order-history"? | It should be immediately (no later than a second). In case of any delay, please share the time of occurrence, API key, and order hash with our team for further check. |
20 | How are orders in an order book sorted/organized when using an API? | The orders are sorted by price; the 'SELL' side will be ASC, and the 'BUY' side will be DESC. If the prices are equal, the orders will be sorted per the creating timestamp (created_at) followed by super_id respectively. |
21 | Does Bitkub have a test environment like a sandbox for users to test the connection and so on? | No, we currently do not have a test market or sandbox. However, we do have the bid and ask tests. (https://github.com/bitkub/bitkub-official-api-docs/blob/master/restful-api.md#post-apimarketplace-bidtest, and https://github.com/bitkub/bitkub-official-api-docs/blob/master/restful-api.md#post-apimarketplace-asktest) |
22 | How does Bitkub calculate the THB amount in the statement (since it sometimes differs from the details received from API order-info (amount x rate))? | Buy THB paid (deduct fee * 0.25%) = Result, any decimal will be rounded up to 2 decimal places. Amount of tokens received will be rounded off to 8 decimal places. ----------------------------------- Sell THB received (deduct fee * 0.25%) = Result, any decimal will be rounded off to 2 decimal places. Amount of tokens paid will be rounded up to 8 decimal places. —--------------------------------- Buy THB paid *0.25% = rounded up to 2 decimal places Tokens received = rounded off to 8 decimal places ----------------------------------- Sell THB received *0.25% = rounded off to 2 decimal places Tokens paid = rounded up to 8 decimal places |
23 | How can users lock the IP to only 1 IP for sending/receiving requests via API? | Use the restrict IP (lock IP) feature. 1. Select the IP that needs locking for the public API secure endpoint (authentication required when using the POST API). 2. On https://www.bitkub.com/publicapi, the called access will show the IP > click Restrict IP to lock it. |
24 | Are the order IDs in placing bid/ask orders and trades WebSocket stream the same? | Same |
25 | What are parent_order_id and super_order_id? | If an order is partially filled, a new order is created with the remaining amount. The first order is both the parent order and the super order. If the second order is partially filled again, a new order is created with the remaining amount. The first order is now the super order, while the second order is the parent order. ** Superorder is the very first order. Parent is the 1 level up order. |
26 | What is the format of the field 'ts' for FTM? | Millisecond (13 digits) for FTM, and second (10 digits) for other tokens. |
2. Error codes
For more information, please visit https://github.com/bitkub/bitkub-official-api-docs.
No. | FAQ | Answer |
1 | What is error 429? | "Too many requests" |
2 | What is error code 21 and how can we fix it? | If you try to cancel an order and it shows an "error", please try re-canceling after waiting for a few more seconds in order to cancel the order successfully. Why does this happen? The "request to cancel order" you send happens at the same time that our system is still processing the "place order request" Our system, therefore, cannot cancel an order that does not yet exist in our order book. Another possibility is that the speed of your trading system did not match the Exchange. |
3 | When does '503 Service Temporarily Unavailable' occur? | At that time, the latency performance was too high. |
4 | How can we fix 'Error 90' [API]? | It is a server error, please contact Support. |
5 | What is the Error 3: Invalid API key when we use an API to get the “wallet balance”? | When you use an API to get the wallet balance, you need to enter the API key for each UID as a signature to access the API. The said error code will appear if something is missing or incorrect. |
3. WebSocket
No. | FAQ | Answer |
1 | WebSocket keeps disconnecting | There are 2 WebSockets: (1) wss://websocket.bitkub.com/websocket-api/1 (2) wss://api.bitkub.com/websocket-api/1 If the first one has an issue, then users can use the second one instead (the first one has a proxy layer while the second one bypasses the proxy). ** Kindly note that it disconnects every hour (users may find error 1006). |
2 | What is the interval for the websocket stream? | The WebSocket provides real-time data. |
3 | How can we get open orders (from WebSocket) with a hash for multiple orders of the same rate and volume? | Unfortunately, this is currently unavailable. |
4 | Is there a WebSocket for balances? | No |
5 | Why is there a lot of WebSocket streams that have lots of packets but show no change in the order book? | Same data means there is no change; it is possible to get the same data. |
6 | Is there an available WebSocket stream for account owner trades? | Our WebSocket only displays a market trade stream instead of account owner trades |
4. Servers and connection
No. | FAQ | Answer |
1 | Does Bitkub have a physical server or a cloud server? | We are using the cloud server: AWS cloud. |
2 | Where is the trade engine located? | Singapore |
3 | Does Bitkub have a colocation service or any URL that is not behind DDOS protection? | No |
4 | Does Bitkub offer any URLs that are not behind Cloudflare? | No |
5 | Trade engine logic | Market orders are always the first to match. Then, limit orders are matched based on price-time prioritization, then best price, and THB. |
6 | What is the purpose of whitelisting? Do they get through the Cloudflare? | The reason we whitelist the IPs is to help support tracking their traffic and reducing latency. For new MMs, when they have the issue, it will be easier to see their behavior for further check. It is getting through Cloudflare. ** It does not help with rate limits. |
7 | How do we calculate the rate per second? Moving window? | It is a moving window. It is safe to say moving window because 1 second is too short and Cloudflare tells that rate limit per second is just an estimation. |
5. Orders, markets, trading, and transactions related
No. | FAQ | Answer |
1 | Does Bitkub have any internal matching engine for orders, or is all the volume displayed and matched in the order books? | All of our orders are currently displayed. |
2 | What are the price and volume precisions/increments of a token and THB? | At the moment, every token will trade with 2 decimal places for price in THB, and 8 decimal places for a token amount, except IOST, USDT, USDC. |
3 | What is the expected delay on each create/cancel order request? | Normally, there is no delay or a maximum of 2 seconds. |
4 | What are the differences between taker and maker orders, and how does it work? | Every trade has two sides, the Maker and the Taker.
|
5 | What are the required withdrawal fees for each chain (e.g. Bitcoin, ERC20, KAP20, Wanchain, Cardano, BEP20, etc.)? | You can find more details about fees at https://www.bitkub.com/fee/cryptocurrency. |
6 | Can the order IDs be duplicated? | If the order is on a different side (buy/sell) or a different symbol, the order IDs can be duplicated, not unique. On the other hand, if it is an order from the same side or the same symbol, the order id will not be duplicated. |
6. Account and daily limit
No. | FAQ | Answer |
1 | Why is my daily limit decreased? | Due to the ongoing (KYC Update) round, the Tier and account limit can be changed (decreased or increased) based on the recent documents the customer submits for verification. |
7. Fee credits
No. | FAQ | Answer |
1 | What are fee credits? | Fee credits are used only for discounts on our trading fees in the THB market on Bitkub Exchange. These amounts cannot be used for withdrawing and transferring. If your account has a fee credit balance of more than 0, it will be automatically applied whenever you buy or sell your tokens. |
8. Others
No. | FAQ | Answer |
1 | Does Bitkub have a market surveillance team? | Yes. |
2 | Is there a system to prevent self-fill? | Yes. |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article