2
Follow
1
Followers
OKEX 선물에서 BTC를 다중 기간 중개하고, this_week와 quarter의 계약 유형을 사용하고, websocket 거래 모드를 사용하고 싶다고 가정해 봅시다.
이제 Exchange에 거래소 객체를 하나만 추가할 수 있으며, GetTicker, exchange.Go를 호출할 때마다 SetContractType를 호출해야 합니다.
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);
질문: 비동기적인 이유로 orderA를 실행할 때 실제로 quarter라는 계약 유형을 사용할 수 있을까요?
다른 질문들:
- 만약 이 문제가 실제로 존재한다면, 어떻게 피할 수 있을까요?
- 같은 거래소의 동일한 거래 쌍이 서로 영향을 미치지 않고 두 개의 교환 객체를 만들 수 있습니까? 예를 들어 두 개의 교환 객체는 서로 영향을 미치지 않고 자체 웹 소켓 연결을 가지고 있습니다.
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
