-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User Data Streams expiring after 24H #23
Comments
For User Data Streams, I have not set up a reconnection mechanism, only public data is reconnected. Because I am worried that it is not triggered by the initiative, there will be a risk of losing private data. Your business end can set up a monitoring application to determine whether the User Data Streams is disconnected. Simply disconnect and re-subscribe. Let me think about whether we need to improve this one. |
what is the best way? |
What version of binance-php do you currently have? Is it 2.1.1? |
I'm up to the latest commit |
You look at your log if there is this information Are you subscribing to spot, future, or delivery? |
usdt-future private function reconnection($global,$type='public',array $keysecret=[]){
and what is this function ? can we have a function for reconnection private channel ? |
You gave too little information. You need to check the log. I can't locate the problem. But in this case, your business end only needs to re-subscribe once. This log is in the location set by your config, and the location in the code is at 'private connection close,ready to reconnect' private function reconnection($global,$type='public',array $keysecret=[]){
$all_sub=$global->get('all_sub');
if(empty($all_sub)) return;
if($type=='public'){
$temp=[];
foreach ($all_sub as $v){
if(!is_array($v)) $temp[]=$v;
}
$global->save('add_sub',$temp);
}else{
}
} This code indicates that when the user disconnects, they need to re-subscribe to the data. I haven't perfected it here, I only completed the public data. Next I have to complete the right place I will finish reconnecting to the private channel as soon as possible |
this must was in also connection is true and connection_close is false i think the reconnecting work truly, but after 24 h binance does not recognize as valid ! I think the previous key should be deleted and a new key created, every 24 hours what do you think ? did I get it right? |
Your findings are very useful, I need time to test, after the test is successful, I will @you |
I have seen this problem several times on futures |
I am testing futures, please wait for my test results |
oh, so why this issue happened for me ? is it possible it happened because of queue |
The queue data saves 100 pieces of data by default, you can set it by configuring queue_count=100. Because I only do a small amount of data test, I will try to add a lot of data later. please wait for my test results $binance->config([
//Number of messages WS queue shuold hold, default 100
'queue_count'=>100,
]); |
after 24 hours our private subscription expires and does not receive the account and order update
The text was updated successfully, but these errors were encountered: