Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 653e7c9

Browse files
committed
Additional abstract methods.
1 parent 131cdbd commit 653e7c9

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

bittrex_websocket/_abc.py

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
# bittrex_websocket/_abc.py
55
# Stanislav Lazarov
6+
#
7+
# Official Bittrex documentation: https://github.com/Bittrex/beta
68

79
from abc import ABC, abstractmethod
810

@@ -111,6 +113,76 @@ def subscribe_to_summary_lite_deltas(self):
111113
}
112114
"""
113115

116+
@abstractmethod
117+
def query_summary_state(self):
118+
"""
119+
Allows the caller to retrieve the full state for all markets.
120+
121+
JSON payload:
122+
{
123+
Nonce: int,
124+
Summaries:
125+
[
126+
{
127+
MarketName: string,
128+
High: decimal,
129+
Low: decimal,
130+
Volume: decimal,
131+
Last: decimal,
132+
BaseVolume: decimal,
133+
TimeStamp: date,
134+
Bid: decimal,
135+
Ask: decimal,
136+
OpenBuyOrders: int,
137+
OpenSellOrders: int,
138+
PrevDay: decimal,
139+
Created: date
140+
}
141+
]
142+
}
143+
"""
144+
145+
@abstractmethod
146+
def query_exchange_state(self, tickers):
147+
"""
148+
Allows the caller to retrieve the full order book for a specific market.
149+
150+
:param tickers: A list of tickers you are interested in.
151+
:type tickers: []
152+
153+
JSON payload:
154+
{
155+
MarketName : string,
156+
Nonce : int,
157+
Buys:
158+
[
159+
{
160+
Quantity : decimal,
161+
Rate : decimal
162+
}
163+
],
164+
Sells:
165+
[
166+
{
167+
Quantity : decimal,
168+
Rate : decimal
169+
}
170+
],
171+
Fills:
172+
[
173+
{
174+
Id : int,
175+
TimeStamp : date,
176+
Quantity : decimal,
177+
Price : decimal,
178+
Total : decimal,
179+
FillType : string,
180+
OrderType : string
181+
}
182+
]
183+
}
184+
"""
185+
114186
@abstractmethod
115187
async def on_public(self, msg):
116188
"""

0 commit comments

Comments
 (0)