Add new documented api get_book_summary_by_currency

deribit_updates
Guillermo Rodriguez 2023-03-09 13:46:19 -03:00
parent 1c833e7175
commit fef8073113
No known key found for this signature in database
GPG Key ID: EC3AB66D5D83B392
1 changed files with 14 additions and 0 deletions

View File

@ -31,6 +31,7 @@ from typing import (
) )
import pendulum import pendulum
import asks
import trio import trio
from trio_typing import TaskStatus from trio_typing import TaskStatus
from fuzzywuzzy import process as fuzzy from fuzzywuzzy import process as fuzzy
@ -357,6 +358,19 @@ class Client:
return LastTradesResult(**resp.result) return LastTradesResult(**resp.result)
async def get_book_summary(
self,
currency: str,
kind: str = 'option'
):
return await self.json_rpc(
'public/get_book_summary_by_currency',
params={
'currency': currency,
'kind': kind
})
class JSONRPCSubRequest(Struct): class JSONRPCSubRequest(Struct):
method: str method: str