Skip to content

Commit b19f69d

Browse files
Wojciech WiśniewskiWojciech "Zarazek" Wiśniewski
authored andcommitted
Changed futures to inverse futures in tutorial and end-to-end test.
1 parent 38b8627 commit b19f69d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/tutorials/simple_trading.py.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def get_order_id():
7777
class SimpleMarketListener(MarketStreamListener):
7878
def on_instrument_data(self, instrument_data):
7979
global selected_futures_id
80-
futures = [instrument for instrument in instrument_data['data'].values() if instrument['type'] == 'futures'][0]
80+
futures = [instrument for instrument in instrument_data['data'].values() if instrument['type'] == 'inverse_futures'][0]
8181
selected_futures_id = futures['instrument_id']
8282

8383
def on_order_book(self, order_book):

end_to_end_tests/test_api_end_to_end.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class MarketStreamServerProtocol(WebSocketServerProtocol):
115115
def onOpen(self):
116116
self.sendMessage(sign({
117117
'type': 'instrument_data',
118-
'data': {'71': {'type': 'futures', 'instrument_id': '71'}},
118+
'data': {'71': {'type': 'inverse_futures', 'instrument_id': '71'}},
119119
}))
120120
self.sendMessage(sign({
121121
'type': 'order_book',

examples/simple_trading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_order_id():
3131
class SimpleMarketListener(MarketStreamListener):
3232
def on_instrument_data(self, instrument_data):
3333
global selected_futures_id
34-
futures = [instrument for instrument in instrument_data['data'].values() if instrument['type'] == 'futures'][0]
34+
futures = [instrument for instrument in instrument_data['data'].values() if instrument['type'] == 'inverse_futures'][0]
3535
selected_futures_id = futures['instrument_id']
3636

3737
def on_order_book(self, order_book):

0 commit comments

Comments
 (0)