2
Follow
1
Followers
OKEX 先物は、Websocket マーケット モードと Go 非同期関数を使用します。契約タイプを切り替えると、何か影響がありますか?
Created 2019-09-14 18:06:24
1
2180
OKEXの期貨でBTCのクロス期アベリートメントをしたいと仮定すると,契約のタイプはthis_weekとquarterで,websocketの行情モデルを使用したい.
今では,exchangeに取引所オブジェクトを1つだけ追加でき,GetTicker,exchange.Goの前にSetContractTypeを1回呼び出す必要があります.
websocket の例のコードと問題は次のとおりです.
exchange.IO("websocket");
exchange.SetContractType("this_week");
var tickerA = exchange.GetTicker();
exchange.SetContractType("quarter");
var tickerB = exchange.GetTicker();
質問:exchange.SetContractType () を呼び出すたびに,ウェブソケットが再接続されますか?
Go関数の例のコードと問題は以下の通りである.
exchange.SetContractType("this_week");
var orderA = exchange.Go("Sell",tickerA.Last, 1);
exchange.SetContractType("quarter");
var orderB = exchange.Go("Buy",tickerB.Last, 1);
Q: 異動性のために,orderAの実行時に実際に使用する契約の種類がquarterになる可能性はありますか?
他の問題:
- もしそうだとしたら,この問題を回避する方法はありますか?
- 同じ取引所の同じ取引ペアで,互いに影響しない2つの交換オブジェクトを作成できますか? 例えば,2つの交換オブジェクトは,それぞれ独自のwebsocket接続があり,互いに影響しない.
Related Recommendations
Elementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?5.5 Trading strategy optimization5.4 Why do we need an off-sample test
Comment
All comments (1)
- 1
