Fixed pair instrument name in search_symbols endpoint.

Fixed instrument in bars endpoint, for options in deribits bs_mktid instead bs_fqme.
Fixed the id is in msg.
deribit_fix
Nelson Torres 2024-11-11 11:00:40 -03:00
parent 6fa0d4bcf3
commit a3ab8dd8fe
2 changed files with 3 additions and 3 deletions

View File

@ -466,7 +466,7 @@ class Client:
# repack in name-keyed table # repack in name-keyed table
return { return {
pair['instrument_name'].lower(): pair pair.instrument_name.lower(): pair
for pair in matches.values() for pair in matches.values()
} }
@ -481,7 +481,7 @@ class Client:
as_np: bool = True, as_np: bool = True,
) -> list[tuple] | np.ndarray: ) -> list[tuple] | np.ndarray:
instrument: str = mkt.bs_fqme instrument: str = mkt.bs_mktid
if end_dt is None: if end_dt is None:
end_dt = now('UTC') end_dt = now('UTC')

View File

@ -483,7 +483,7 @@ async def open_jsonrpc_session(
# response in original "result" msg, # response in original "result" msg,
# THEN FINALLY set the event to signal caller # THEN FINALLY set the event to signal caller
# to raise the error in the parent task. # to raise the error in the parent task.
req_id: int = error['id'] req_id: int = msg['id']
req_msg: dict = req_msgs[req_id] req_msg: dict = req_msgs[req_id]
result: dict = rpc_results[req_id] result: dict = rpc_results[req_id]
result['error'] = error result['error'] = error