Sample connectors for connecting to the BTSE API.
-
2023-10-05
- Add .NET6 sample code.
-
2023-09-27
- Remove the btse wording
-
2023-09-23
- Add dotenv package for Nodejs.
- Add example in README for running without docker
-
2022-09-14
- Add examples to create oco futures order
-
2023-09-07
- Replace the variable names
staging-urlanddev-urlwithapi-urlin Postman collection. - Add Testnet environment file in Postman folder.
- Add steps for importing the environment file in the Postman README.
- Replace the variable names
-
2023-08-31
- Update sign header from btse-* to request-*
-
2022-08-19
- Add examples to get order status via notification v2 websocket topic
-
2022-06-28
- Add examples to query futures trade history
-
2022-04-09
- Add python example to delete multiple orders
-
2022-03-30
- Add nodejs sample to get all futures position via
allPositionwebsocket topic
- Add nodejs sample to get all futures position via
-
2022-03-24
- Add python and js samples for oss delta orderbook
nodejs -> app -> spot -> ws-oss-delta.jsnodejs -> app -> spot -> ws-oss-snapshot.jspython -> api -> spot_ws_get_oss_delta.pypython -> api -> spot_ws_get_oss_snapshot.py
- Add python and js samples for oss delta orderbook
-
2022-02-18
- Add more examples for
amend orderand others
- Add more examples for
-
2022-02-02
- Futures settle_in sample to change settlement currency
-
2022-01-25
- Add nodejs example for
fetch wallet convert rateandotc partial transact
- Add nodejs example for
-
2022-01-18
- Add python docker environment and adjust file structure
-
2022-01-13
- Add examples for wallet convert and transfer
-
2022-01-10
- Update Nodejs orderbook delta examples
-
2021-12-27
- Update Python and Nodejs examples
-
API version
- Spot: v3.2
- Futures: v2.1
- Otc: v1
-
-
How to play with python examples with docker
- Run
cp config/.env.example python/.envand fill-in needed data in.env - Set
pythonas your current working directory make api-sample-pythonto build the runtime environment docker imagemake run {{EXAMPLE_FILE}}to run the example within docker container, for example:make run api/spot_get_wallet_balance.py
- Run
-
How to play with python examples without docker
- Run
cp config/.env.example python/.envand fill-in needed data in.env - Set
pythonas your current working directory - install Python (version > 3)
- install package by poetry
python run {{EXAMPLE_FILE}}to run the example, for example:python api/spot_get_wallet_balance.py
- Run
-
-
-
How to play with node examples with docker
- Run
cp config/.env.example nodejs/.envand fill-in needed data in.env - Set
nodejsas your current working directory make api-sample-nodejsto build the runtime environment docker imagemake run {{EXAMPLE_FILE}}to run the example within docker container, for example:make run app/spot/query-market-summary.js
- Run
-
How to play with node examples without docker
- Run
cp config/.env.example nodejs/.envand fill-in needed data in.env - Set
nodejsas your current working directory - install Nodejs (version > 16)
npm installto install required packagesnode {{EXAMPLE_FILE}}to run the example, for example:node app/spot/query-market-summary.js
- Run
-
-
- How to play with C# examples without docker
- Run
cp config/.env.example CSharp/BTSEApiSample/BTSEApiSample/.envand fill-in needed data in.env - Install .NET6 SDK. You can find download link here.
- Open
CSharp/BTSEApiSample/BTSEApiSample.slnwith Visual Studio. - Run the project you want to test with Visual Studio.
- Run
- How to play with C# examples without docker
| Document Name | Python |
|---|---|
| Deposit Investment | earn_buy_product.py |
| Query Investment History | earn_get_history.py |
| Query Investment Orders | earn_get_orders.py |
| Query Investment Products | earn_get_products.py |
| Redeem Investment | earn_redeem_product.py |
| Renew Investment | earn_renew_product.py |
| Document Name | Python |
|---|---|
| Market Summary | futures_get_market_summary.py |
| Charting Data | futures_charting_data.py |
| Query Market price | futures_query_market_price.py |
| Orderbook (By grouping) | futures_get_orderbook.py |
| Orderbook | futures_get_orderbook_L2.py |
| Query Trades Fills | futures_get_trades.py |
| Document Name | Python |
|---|---|
| Create new order | futures_place_limit_order.py |
| Create new algo order | futures_create_new_algo_order.py |
| Amend Order | futures_amend_order.py |
| Cancel Order | futures_cancel_order.py |
| Dead man's switch (Cancel all after) | futures_cancel_all_after.py |
| Query Open Orders | futures_get_open_orders.py |
| Query Trades Fills | futures_query_trades_fills.py |
| Query Position | futures_query_position.py |
| Close Position | futures_close_position.py |
| Set Risk Limits | futures_set_risk_limits.py |
| Set Leverage | futures_set_leverage.py |
| Change contract settlement currency | futures_change_settlement_currency.py |
| Query Account Fees | futures_query_account_fees.py |
| Document Name | Python |
|---|---|
| Query Wallet Balance | futures_query_wallet_balance.py |
| Query Wallet History | futures_query_wallet_history.py |
| Query Wallet Margin | futures_query_wallet_margin.py |
| Transfer funds between Futures wallet | futures_transfer_funds_between_futures_wallet.py |
| Document Name | Python |
|---|---|
| Subscription | futures_ws_subscription.py |
| Orderbook Snapshot (By grouping) | futures_ws_get_orderbook_group.py |
| Orderbook Snapshot (By depth) | futures_ws_get_orderbook_depth.py |
| Orderbook Incremental Updates | futures_ws_get_oss_delta.py |
| Public Trade Fills | futures_ws_public_trade_fills.py |
| Authentication | futures_ws_authentication.py |
| Notifications | futures_ws_notifcations.py |
| User Trade Fills | futures_ws_user_trade_fillls.py |
| All Position | futures_ws_get_all_position.py |
| Document Name | Python |
|---|---|
| Market Summary | otc_get_market_summary.py |
| Request for Quote | otc_get_quote.py |
| Accept Quote | otc_accept_quote.py |
| Query Order |
| Document Name | Python |
|---|---|
| Authentication | otc_ws_authentication.py |
| Quote Stream | otc_ws_quote_stream.py |
| Document Name | Python |
|---|---|
| Streaming OTC | streaming_otc.py |
| Document Name | Python |
|---|---|
| Authentication | otc_ws_authentication.py |
| Quote Stream | otc_ws_quote_stream.py |
| Document Name | Python |
|---|---|
| Query available crypto network list for currency | queryAvailableCrypo.py |
| Query exchange rate between assets | queryExchangeRate.py |
| Document Name | Python |
|---|---|
| Query Wallet Balance | queryWalletBalance.py |
| Query Wallet History | WalletqueryWalletHistory.py |
| Query available currency list for wallet action | queryAvailableCurrency.py |
| Convert funds | WalletConvertFunds.py |
| Transfer funds | WalletTransferFunds.py |