Frequently Asked Questions
Where are Bybit's servers located?
AWS Singapore, Availability Zone ID apse1-az3.
reduceOnly
and closeOnTrigger
- what's the difference?
- To close your position, submit an order and specify
reduceOnly
to true.closeOnTrigger
is not strictly applicable here, but you can also set it to true if it's required. - reduceOnly is the one that really matters for closing position, and we will improve the interface in the future.
- Be careful when you specify closeOnTrigger to true as it could cause conflict when reduceOnly is false.
Why aren't all my orders showing on the website?
- Users who have bots which place large numbers of laddered orders will be restricted by the frontend interface, which only shows a maximum of 50 orders on-screen.
- Don't worry, your orders are still in the system and can be queried by the API, but the frontend cannot show more than 50.
Calculating order size based on available wallet balance
price * availableBalance * leverage * perc * (1 - (0.0006 * 2))
- Unfortunately this is not a perfectly accurate formula; the real calculation is complex and may be published in the docs at a later date.
price
- last price (or your entry price) - can be found with the Tickers.availableBalance
- can be found with the Position Info endpoint.leverage
- up to the respective maximum leverage for the market and your risk limit (eg 2, 10, 50).perc
- 0.1 for 10%, 0.25 for 25%, etc.1 - (0.0006 * 2)
- used to calculate the maximum order cost (always assumes entry & exit orders use taker fee regardless actual fee).
Can I exchange assets with the API?
- There is no endpoint to exchange assets. This can only be done on the website.
- However, it is possible to access your Asset Exchange Records.
How do I get funds for testnet?
To get testnet funds, just go to master account asset page to request.
Why are my Closed PNL prices inaccurate?
- The
entryPrice
andexitPrice
returned by Closed PNL endpoints are not the actual execution prices of the orders. - It is based on the total costs of the order (whether or not the position was only opened/closed by one order executed at one price - it is more complicated if multiple orders opened/closed a position.)
- For instance, the entry_price and exit_price reported by this endpoint are influenced by the fee paid/received on the orders.
How can I ensure I am using up-to-date data?
- It is possible, although unlikely, that the REST API or (even less likely) the websocket could return/push old data.
- For the greatest level of data resilience, we recommend clients to:
- firstly, rely on the websocket, which will not only ensure you get the latest data as fast as possible, but will also ensure you get complete data
- secondly, query the REST API to fill in any discrepencies in data - or between websocket disconnections.
- The best practice is to save all of this data locally in your own database or cache.
- This frees up your rate limits for other requests and also ensures a level of redundancy against the exchange in case of data delays.
What is the difference between turnover and volume?
Turnover
: is in the opposite currency to the quantity's currencyVolume
: is in the same currency as the quantity's currency
Why is the price returned in the place market order response wrong?
Market orders are (in the backend) just limit orders submitted at a worse price. This is to reduce the chance of a flash crash or a similar event, where a trader might submit a market order which executes at a significantly worse price than they expected it to. The price returned here is that internal limit order price. This "inaccurate" price is returned because the place order endpoint is asynchronous, meaning the response is returned to you before the order is actually executed.
If you want the true execution price (execPrice
) you should subscribe to the execution websocket.
How can I process WebSocket snapshot
and delta
messages?
Please refer to the orderbook topic's documentation.
Note that if you're using pybit, it handles these messages for you and always delivers a complete orderbook. Working code examples: