Skip to content

Commit e725a0b

Browse files
authored
Added crypto snapshot endpoint (#539)
1 parent 7d9872b commit e725a0b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

alpaca_trade_api/rest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,12 @@ def get_latest_crypto_xbbo(self,
876876
api_version='v1beta1')
877877
return self.response_wrapper(resp['xbbo'], QuoteV2)
878878

879+
def get_crypto_snapshot(self, symbol: str, exchange: str) -> SnapshotV2:
880+
resp = self.data_get('/crypto/{}/snapshot'.format(symbol),
881+
data={'exchange': exchange},
882+
api_version='v1beta1')
883+
return self.response_wrapper(resp, SnapshotV2)
884+
879885
def get_clock(self) -> Clock:
880886
resp = self.get('/clock')
881887
return self.response_wrapper(resp, Clock)

0 commit comments

Comments
 (0)