Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion edgex_sdk/quote/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, contract_id: str, kline_type: KlineType, price_type: PriceTyp


class GetOrderBookDepthParams:
def __init__(self, contract_id: str, limit: int = 50):
def __init__(self, contract_id: str, limit: int = 15):
self.contract_id = contract_id
self.limit = limit

Expand Down
13 changes: 13 additions & 0 deletions tests/test_quote_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from edgex_sdk.quote.client import (
Client as QuoteClient,
GetMarketStatusParams,
GetOrderBookDepthParams,
)


Expand Down Expand Up @@ -35,6 +36,18 @@ def test_get_market_status(self):
),
)

def test_get_order_book_depth_default_level(self):
asyncio.run(self.client.get_order_book_depth(GetOrderBookDepthParams("10000001")))

self.assertEqual(
self.fake.calls[-1],
(
"GET",
"/api/v2/public/quote/getDepth",
{"contractId": "10000001", "level": "15"},
),
)


if __name__ == "__main__":
unittest.main()