Skip to content

Commit

Permalink
WS API
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-zehentleitner committed Nov 13, 2024
1 parent ab404bb commit c68c7f2
Show file tree
Hide file tree
Showing 4 changed files with 383 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
## 2.9.0.dev (development stage/unreleased/unstable)
### Added
- New `Websocket API Spot` functions:
- `manager.api.spot.cancel_and_replace_order()`
- `manager.api.spot.get_aggregate_trades()`
- `manager.api.spot.get_historical_trades()`
- `manager.api.spot.get_klines()`
Expand Down
4 changes: 2 additions & 2 deletions binance_websocket_api_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import logging
import os

api_key = "3CJ8NHXgSk6BQxc7bWnHHjkxARxlgwJBZOmUQzmmsA9JV2sdpj52fJuwXAMyMlOX"
api_secret = "js50rXE3hb7LFQV0dIQlX3s2qrxlvksqlnY3wH6s3rop78EkqmX7EyqMMvwwp6Ty"
api_key = ""
api_secret = ""
market = "BTCUSDC"

async def binance_api(ubwa):
Expand Down
8 changes: 4 additions & 4 deletions binance_websocket_api_spot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import logging
import os

api_key = "3CJ8NHXgSk6BQxc7bWnHHjkxARxlgwJBZOmUQzmmsA9JV2sdpj52fJuwXAMyMlOX"
api_secret = "js50rXE3hb7LFQV0dIQlX3s2qrxlvksqlnY3wH6s3rop78EkqmX7EyqMMvwwp6Ty"
api_key = ""
api_secret = ""
market = "BTCUSDT"

async def binance_api(ubwa):
Expand All @@ -33,8 +33,8 @@ async def handle_socket_message(stream_id=None):
ubwa.api.spot.get_order_book(stream_id=api_stream, symbol=market, limit=2)
ubwa.api.spot.get_aggregate_trades(stream_id=api_stream, symbol=market)
ubwa.api.spot.get_historical_trades(stream_id=api_stream, symbol=market)
ubwa.api.spot.get_klines(stream_id=api_stream, symbol=market)
ubwa.api.spot.get_ui_klines(stream_id=api_stream, symbol=market)
ubwa.api.spot.get_klines(stream_id=api_stream, symbol=market, interval="1m")
ubwa.api.spot.get_ui_klines(stream_id=api_stream, symbol=market, interval="1d")
ubwa.api.spot.get_recent_trades(stream_id=api_stream, symbol=market)
ubwa.api.spot.cancel_order(stream_id=api_stream, symbol=market, orig_client_order_id=orig_client_order_id)
ubwa.api.spot.get_open_orders(stream_id=api_stream, symbol=market)
Expand Down
Loading

0 comments on commit c68c7f2

Please sign in to comment.