Bybit spot (testnet) - Order price decimal too long.

See original GitHub issue
  • OS: Linux
  • Programming Language version: php 8
  • CCXT version: 1.83.69
$e = new \ccxt\bybit([
'apiKey' => '',
'secret' =>'',
'timeout' => 30000,
'enableRateLimit' => true,
'options' => ['defaultType' => 'spot']]
);

$e->set_sandbox_mode(true);
$e->load_markets();

$e->create_order('BTC3S/USDT', 'limit', 'buy', 1.0, $e->price_to_precision('BTC3S/USDT',18.0331288));

ccxt\ExchangeError with message 'bybit {"ret_code":-1134,"ret_msg":"Order price decimal too long.","ext_code":null,"ext_info":null,"result":null}'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
szwagroscommented, May 26, 2022

Sure. I was just pointing out difference between order status in bybit gui and api response. Btw. there is probably bug in timeInForce field parsing - API returns GTC a ccxt return IOC.

0reactions
kroitorcommented, May 25, 2022

@szwagros as you can see from the info above, the status is coming from the exchange API (the testnet) directly, first hand – the info field contains the order structure returned from the exchange as is, untouched. And it says, "status" => "CANCELED", so that is what the exchange API says. This is not an issue in CCXT, but it could be a peculiarity of the Bybit testnet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Group And Resources – Bybit API Docs - GitHub Pages
Users who have bots which place large numbers of laddered orders will be ... price_scale, number, Price scale (the number of decimal places...
Read more >
Price Decimal Precision : r/Bybit - Reddit
Price Decimal Precision. We can now select to view the order book market depth at 0.5 and 1. This means that we can...
Read more >
Powerful APIs for Developers - Bybit
The Ultimate Speed of Trading. Futures, Options and Spot trading supported; Fast trading experience; Timely market insights. partners. User. Create/ ...
Read more >
Exchanges — ccxt 2.4.71 documentation
Each exchange is a place for trading some kinds of valuables. ... number of decimal digits "after the dot" 'price': 8, // integer...
Read more >
How to Margin Trade on Bybit — the Superior Derivatives ...
Bybit allows you to place a trade with both a target and a stop in ... 100x Leverage in a long you will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found