Comments (3)
Hi i kept getting this error. Synching my comp time didn't help or helped for short time.
To solve this problem i've modified \vendor\linwj\bybit\src\RequestV5.php
There you will find function called nonce() It need to be changed to this:
protected function nonce() { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, 'https://api.bybit.com/v5/market/time'); $output = curl_exec($ch); curl_close($ch); $data = json_decode($output, true); $this->nonce=$data['time']; }
Now i always have server time in my request, so this error never appeared ever again.
P.S. hope this will be fixed in further updates.
I didn't find the problem in my tests, is it caused by the inconsistency between your server time and the exchange's server time?
What are the details of the error?
from bybit-php.
Hi, thanks for you answer.
So if there are no other complainants, i guess this is my local problem. My computer somehow doen't synch time properly. I don't want to fix it, because it is easier to use server time :)
When i used binance php sdk, i've been experiencing the same problem there.
But for binance sdk there already exist function UseServerTime().
from bybit-php.
Full error response is next:
Array
(
[retCode] => 10002
[retMsg] => invalid request, please check your server timestamp or recv_window param. req_timestamp[1710434116927],server_timestamp[1710434114398],recv_window[5000]
[result] => Array
(
)
[retExtInfo] => Array
(
)
[time] => 1710434114398
)
Appears on $bybit->order()->postCreate() and other which requiers timestamp
from bybit-php.
Related Issues (20)
- Connectivity issue HOT 10
- Inverse Perpetual wrong. HOT 1
- undefined function postUserLeverageSave()
- error sign! with position_idx
- Problems during postOrderCreate - body not json HOT 5
- invalid signature for boolean values HOT 1
- How to connect to testnet ? HOT 3
- privates->postOrderCreate() signature issue HOT 4
- Too many visits. Exceeded the API Rate Limit. HOT 2
- how to calling the api
- Rate limit HOT 2
- 429 error HOT 1
- An "error sign" error when there is a cursor in data
- How do I set up a test host for a client? HOT 1
- Missing Instrument Info Method HOT 1
- ByBit API returns error: Param validation for 'symbol' failed on the 'linear_symbol' tag HOT 2
- ByBit Websocket Support HOT 2
- BybitSpot HOT 2
- Proxy with authorization ip:port@login:pass HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bybit-php.