foxbit-group-rest-api 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- foxbit_group_rest_api-0.1.2/LICENSE +21 -0
- foxbit_group_rest_api-0.1.2/MANIFEST.in +3 -0
- foxbit_group_rest_api-0.1.2/PKG-INFO +433 -0
- foxbit_group_rest_api-0.1.2/README.md +393 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/__init__.py +168 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/_enum_mode.py +6 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/__init__.py +15 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/account_api.py +643 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/banks_api.py +282 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/deposit_api.py +1217 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/market_data_api.py +2688 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/member_info_api.py +534 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/prime_desk_api.py +1409 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/system_api.py +282 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/trading_api.py +2769 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/transactional_limits_api.py +288 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/travel_rule_api.py +354 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api/withdrawal_api.py +913 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api_client.py +900 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/api_response.py +21 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/configuration.py +587 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/exceptions.py +217 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/__init__.py +141 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/account.py +94 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/accounts.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/bank.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/bank_account.py +103 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/bank_account_data.py +100 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/bank_branch.py +95 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/bank_data.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/banks.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/beneficiary_own_exchange_wallet.py +117 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/beneficiary_own_private_wallet.py +115 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/beneficiary_third_party_exchange_wallet.py +133 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/beneficiary_third_party_private_wallet.py +131 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/best.py +97 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/best_side.py +88 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/best_side_with_volume.py +90 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/best_with_volume.py +97 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/cancel_orders_request.py +225 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/candlestick_inner.py +175 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/create_deposit_travel_rule_request.py +197 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/create_order_request.py +211 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/create_withdrawal_request.py +169 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/currencies.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/currency.py +153 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/currency_category.py +90 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/currency_deposit_info.py +102 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/currency_network.py +90 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/currency_withdraw_info.py +102 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/deposit.py +129 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/deposit_address.py +115 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/deposit_travel_rule_response.py +162 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/deposits.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/details_crypto.py +102 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/details_withdraw_crypto.py +109 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/details_withdraw_crypto_tag.py +109 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/error_data.py +99 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/error_details.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/error_response.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/execute_quote_created_model.py +118 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/fees.py +90 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/get_ticker_response.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/get_ticker_with_best_response.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/last_trade.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/market.py +134 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/market_currency.py +108 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/market_model.py +111 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/markets.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/markets_base_currency_model.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/markets_quote_currency_model.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/markets_response_model.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/member.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/network.py +104 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/network_deposit_info.py +102 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/network_withdraw_info.py +109 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/operation_reason.py +99 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/operation_reasons.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order.py +248 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_batch_response.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_batch_response_error.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_batch_result.py +101 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_cancel.py +103 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_cancel_replace.py +111 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_cancel_replace_cancel_result.py +94 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_cancel_replace_create_result.py +101 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_cancel_replace_error.py +97 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_canceled.py +90 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_canceled_replaced.py +98 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_create_batch_model.py +97 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_created.py +97 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_instant.py +152 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_limit.py +171 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_market.py +152 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_stop.py +154 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_stop_limit.py +173 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/order_without_remark.py +241 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/orderbook_depth.py +95 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/orders.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/orders_cancel_all.py +114 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/orders_cancel_client_order_id.py +116 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/orders_cancel_id.py +116 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/orders_cancel_market.py +116 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/orders_cancel_market_side.py +128 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/orders_cancel_sn.py +116 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/orders_canceled.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/originator_own_exchange_wallet.py +117 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/originator_own_private_wallet.py +115 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/originator_third_party_exchange_wallet.py +133 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/originator_third_party_private_wallet.py +131 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/prime_desk_execute_quote_model.py +90 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/prime_desk_execution_history_data.py +130 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/prime_desk_execution_history_model.py +98 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/public_trade.py +110 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/public_trades.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/quote.py +110 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/request_for_quote.py +169 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/request_for_quote_by_amount.py +103 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/request_for_quote_by_quantity.py +103 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/request_for_quote_response_model.py +109 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/rolling24_hr.py +102 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/sparkline.py +91 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/sparkline400.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/sparkline400_error.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/sparklines.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/system_time.py +90 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/ticker.py +106 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/ticker_with_best.py +106 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/trade.py +135 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/trades.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/trading_fee.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/trading_fees_response.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/transaction.py +115 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/transactional_limit.py +90 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/transactional_limits.py +99 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/transactional_limits_response.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/transactions_response.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/travel_rule_info_response.py +147 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/unauthorized_error.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/unauthorized_error_response.py +92 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/withdrawal.py +144 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/withdrawal_created.py +130 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/withdrawal_crypto.py +102 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/withdrawal_fiat.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/withdrawal_list.py +144 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/withdrawal_travel_rule.py +197 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/models/withdrawals.py +96 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/py.typed +0 -0
- foxbit_group_rest_api-0.1.2/foxbit_group/rest_api/rest.py +259 -0
- foxbit_group_rest_api-0.1.2/foxbit_group_rest_api.egg-info/PKG-INFO +433 -0
- foxbit_group_rest_api-0.1.2/foxbit_group_rest_api.egg-info/SOURCES.txt +156 -0
- foxbit_group_rest_api-0.1.2/foxbit_group_rest_api.egg-info/dependency_links.txt +1 -0
- foxbit_group_rest_api-0.1.2/foxbit_group_rest_api.egg-info/requires.txt +4 -0
- foxbit_group_rest_api-0.1.2/foxbit_group_rest_api.egg-info/top_level.txt +1 -0
- foxbit_group_rest_api-0.1.2/pyproject.toml +64 -0
- foxbit_group_rest_api-0.1.2/setup.cfg +7 -0
- foxbit_group_rest_api-0.1.2/setup.py +71 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Foxbit Group
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: foxbit-group-rest-api
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Foxbit REST API
|
|
5
|
+
Home-page: https://github.com/foxbit-group/foxbit-python-sdk
|
|
6
|
+
Author: Foxbit
|
|
7
|
+
Author-email: developers@foxbit.com.br
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: OpenAPI,OpenAPI-Generator,Foxbit REST API,foxbit,crypto,exchange
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >= 3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: urllib3<3.0.0,>=2.1.0
|
|
25
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
26
|
+
Requires-Dist: pydantic>=2
|
|
27
|
+
Requires-Dist: typing-extensions>=4.7.1
|
|
28
|
+
Dynamic: author
|
|
29
|
+
Dynamic: author-email
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: keywords
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: requires-python
|
|
39
|
+
Dynamic: summary
|
|
40
|
+
|
|
41
|
+
# Foxbit Python SDK
|
|
42
|
+
|
|
43
|
+
This is the official SDK provided by Foxbit for interacting with our APIs using Python.
|
|
44
|
+
|
|
45
|
+
## Prerequisites
|
|
46
|
+
|
|
47
|
+
- Python 3.9 or higher
|
|
48
|
+
- pip
|
|
49
|
+
|
|
50
|
+
## Installation
|
|
51
|
+
|
|
52
|
+
Install the SDK using pip:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install foxbit-group-rest-api
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## How to Use
|
|
59
|
+
|
|
60
|
+
To start using the SDK, import the desired API module and call its methods:
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from foxbit_group.rest_api import ApiClient
|
|
64
|
+
from foxbit_group.rest_api.api import MarketDataApi
|
|
65
|
+
|
|
66
|
+
with ApiClient() as client:
|
|
67
|
+
market_data_api = MarketDataApi(client)
|
|
68
|
+
|
|
69
|
+
currencies = market_data_api.list_currencies()
|
|
70
|
+
print("Currencies:", currencies)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For public endpoints that don't require authentication, you can use the SDK without any configuration.
|
|
74
|
+
|
|
75
|
+
## Authentication
|
|
76
|
+
|
|
77
|
+
For authenticated endpoints, instantiate a `Configuration` object with your API credentials and pass it to `ApiClient`:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from foxbit_group.rest_api import ApiClient, Configuration
|
|
81
|
+
from foxbit_group.rest_api.api import TradingApi
|
|
82
|
+
from foxbit_group.rest_api.models import CreateOrderRequest, OrderMarket
|
|
83
|
+
|
|
84
|
+
# Initialize the configuration with your API key and secret
|
|
85
|
+
config = Configuration(
|
|
86
|
+
api_key="YOUR_API_KEY",
|
|
87
|
+
api_secret="YOUR_API_SECRET",
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
with ApiClient(config) as client:
|
|
91
|
+
trading_api = TradingApi(client)
|
|
92
|
+
|
|
93
|
+
# CreateOrderRequest wraps one of the concrete order types
|
|
94
|
+
# (OrderMarket, OrderLimit, OrderInstant, OrderStop, OrderStopLimit)
|
|
95
|
+
order = trading_api.create_order(
|
|
96
|
+
create_order_request=CreateOrderRequest(
|
|
97
|
+
OrderMarket(
|
|
98
|
+
side="BUY",
|
|
99
|
+
type="MARKET",
|
|
100
|
+
market_symbol="btcbrl",
|
|
101
|
+
quantity="1",
|
|
102
|
+
)
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
print("Order created:", order)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The SDK will automatically:
|
|
109
|
+
|
|
110
|
+
1. Generate the current timestamp
|
|
111
|
+
2. Create the request signature using your API secret (HMAC-SHA256)
|
|
112
|
+
3. Add the required headers to each request:
|
|
113
|
+
- `X-FB-ACCESS-KEY`: Your API key
|
|
114
|
+
- `X-FB-ACCESS-TIMESTAMP`: Current timestamp
|
|
115
|
+
- `X-FB-ACCESS-SIGNATURE`: Signature generated from your API secret
|
|
116
|
+
|
|
117
|
+
Your `api_secret` is only used locally to sign requests; it is never sent over the wire.
|
|
118
|
+
|
|
119
|
+
> **Note on retries:** the signature and timestamp are computed once, when the
|
|
120
|
+
> request is serialized. If you enable transport-level retries
|
|
121
|
+
> (`Configuration(retries=...)`), a retried attempt replays the original
|
|
122
|
+
> timestamp and may be rejected as expired. Prefer retrying at the call site
|
|
123
|
+
> (call the SDK method again) so each attempt is signed afresh.
|
|
124
|
+
|
|
125
|
+
## Error Handling
|
|
126
|
+
|
|
127
|
+
API errors raise typed exceptions, all inheriting from `ApiException`:
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
from foxbit_group.rest_api import ApiClient, Configuration
|
|
131
|
+
from foxbit_group.rest_api.api import TradingApi
|
|
132
|
+
from foxbit_group.rest_api.exceptions import ApiException, UnauthorizedException
|
|
133
|
+
|
|
134
|
+
config = Configuration(api_key="YOUR_API_KEY", api_secret="YOUR_API_SECRET")
|
|
135
|
+
|
|
136
|
+
with ApiClient(config) as client:
|
|
137
|
+
try:
|
|
138
|
+
orders = TradingApi(client).list_orders()
|
|
139
|
+
except UnauthorizedException:
|
|
140
|
+
print("Invalid credentials or rejected signature")
|
|
141
|
+
except ApiException as e:
|
|
142
|
+
print(f"API error: {e.status} - {e.body}")
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Documentation for API Endpoints
|
|
146
|
+
|
|
147
|
+
You can find detailed documentation for each API endpoint in the [Foxbit API Documentation](https://docs.foxbit.com.br/rest/v3).
|
|
148
|
+
|
|
149
|
+
Each API class has its own page, with an example per method:
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
- [AccountApi](docs/AccountApi.md)
|
|
153
|
+
|
|
154
|
+
- [BanksApi](docs/BanksApi.md)
|
|
155
|
+
|
|
156
|
+
- [DepositApi](docs/DepositApi.md)
|
|
157
|
+
|
|
158
|
+
- [MarketDataApi](docs/MarketDataApi.md)
|
|
159
|
+
|
|
160
|
+
- [MemberInfoApi](docs/MemberInfoApi.md)
|
|
161
|
+
|
|
162
|
+
- [PrimeDeskApi](docs/PrimeDeskApi.md)
|
|
163
|
+
|
|
164
|
+
- [SystemApi](docs/SystemApi.md)
|
|
165
|
+
|
|
166
|
+
- [TradingApi](docs/TradingApi.md)
|
|
167
|
+
|
|
168
|
+
- [TransactionalLimitsApi](docs/TransactionalLimitsApi.md)
|
|
169
|
+
|
|
170
|
+
- [TravelRuleApi](docs/TravelRuleApi.md)
|
|
171
|
+
|
|
172
|
+
- [WithdrawalApi](docs/WithdrawalApi.md)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
## Documentation for Models
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
- [Account](docs/Account.md)
|
|
179
|
+
|
|
180
|
+
- [Accounts](docs/Accounts.md)
|
|
181
|
+
|
|
182
|
+
- [Bank](docs/Bank.md)
|
|
183
|
+
|
|
184
|
+
- [BankAccount](docs/BankAccount.md)
|
|
185
|
+
|
|
186
|
+
- [BankAccountData](docs/BankAccountData.md)
|
|
187
|
+
|
|
188
|
+
- [BankBranch](docs/BankBranch.md)
|
|
189
|
+
|
|
190
|
+
- [BankData](docs/BankData.md)
|
|
191
|
+
|
|
192
|
+
- [Banks](docs/Banks.md)
|
|
193
|
+
|
|
194
|
+
- [BeneficiaryOwnExchangeWallet](docs/BeneficiaryOwnExchangeWallet.md)
|
|
195
|
+
|
|
196
|
+
- [BeneficiaryOwnPrivateWallet](docs/BeneficiaryOwnPrivateWallet.md)
|
|
197
|
+
|
|
198
|
+
- [BeneficiaryThirdPartyExchangeWallet](docs/BeneficiaryThirdPartyExchangeWallet.md)
|
|
199
|
+
|
|
200
|
+
- [BeneficiaryThirdPartyPrivateWallet](docs/BeneficiaryThirdPartyPrivateWallet.md)
|
|
201
|
+
|
|
202
|
+
- [Best](docs/Best.md)
|
|
203
|
+
|
|
204
|
+
- [BestSide](docs/BestSide.md)
|
|
205
|
+
|
|
206
|
+
- [BestSideWithVolume](docs/BestSideWithVolume.md)
|
|
207
|
+
|
|
208
|
+
- [BestWithVolume](docs/BestWithVolume.md)
|
|
209
|
+
|
|
210
|
+
- [CancelOrdersRequest](docs/CancelOrdersRequest.md)
|
|
211
|
+
|
|
212
|
+
- [CandlestickInner](docs/CandlestickInner.md)
|
|
213
|
+
|
|
214
|
+
- [CreateDepositTravelRuleRequest](docs/CreateDepositTravelRuleRequest.md)
|
|
215
|
+
|
|
216
|
+
- [CreateOrderRequest](docs/CreateOrderRequest.md)
|
|
217
|
+
|
|
218
|
+
- [CreateWithdrawalRequest](docs/CreateWithdrawalRequest.md)
|
|
219
|
+
|
|
220
|
+
- [Currencies](docs/Currencies.md)
|
|
221
|
+
|
|
222
|
+
- [Currency](docs/Currency.md)
|
|
223
|
+
|
|
224
|
+
- [CurrencyCategory](docs/CurrencyCategory.md)
|
|
225
|
+
|
|
226
|
+
- [CurrencyDepositInfo](docs/CurrencyDepositInfo.md)
|
|
227
|
+
|
|
228
|
+
- [CurrencyNetwork](docs/CurrencyNetwork.md)
|
|
229
|
+
|
|
230
|
+
- [CurrencyWithdrawInfo](docs/CurrencyWithdrawInfo.md)
|
|
231
|
+
|
|
232
|
+
- [Deposit](docs/Deposit.md)
|
|
233
|
+
|
|
234
|
+
- [DepositAddress](docs/DepositAddress.md)
|
|
235
|
+
|
|
236
|
+
- [DepositTravelRuleResponse](docs/DepositTravelRuleResponse.md)
|
|
237
|
+
|
|
238
|
+
- [Deposits](docs/Deposits.md)
|
|
239
|
+
|
|
240
|
+
- [DetailsCrypto](docs/DetailsCrypto.md)
|
|
241
|
+
|
|
242
|
+
- [DetailsWithdrawCrypto](docs/DetailsWithdrawCrypto.md)
|
|
243
|
+
|
|
244
|
+
- [DetailsWithdrawCryptoTag](docs/DetailsWithdrawCryptoTag.md)
|
|
245
|
+
|
|
246
|
+
- [ErrorData](docs/ErrorData.md)
|
|
247
|
+
|
|
248
|
+
- [ErrorDetails](docs/ErrorDetails.md)
|
|
249
|
+
|
|
250
|
+
- [ErrorResponse](docs/ErrorResponse.md)
|
|
251
|
+
|
|
252
|
+
- [ExecuteQuoteCreatedModel](docs/ExecuteQuoteCreatedModel.md)
|
|
253
|
+
|
|
254
|
+
- [Fees](docs/Fees.md)
|
|
255
|
+
|
|
256
|
+
- [GetTickerResponse](docs/GetTickerResponse.md)
|
|
257
|
+
|
|
258
|
+
- [GetTickerWithBestResponse](docs/GetTickerWithBestResponse.md)
|
|
259
|
+
|
|
260
|
+
- [LastTrade](docs/LastTrade.md)
|
|
261
|
+
|
|
262
|
+
- [Market](docs/Market.md)
|
|
263
|
+
|
|
264
|
+
- [MarketCurrency](docs/MarketCurrency.md)
|
|
265
|
+
|
|
266
|
+
- [MarketModel](docs/MarketModel.md)
|
|
267
|
+
|
|
268
|
+
- [Markets](docs/Markets.md)
|
|
269
|
+
|
|
270
|
+
- [MarketsBaseCurrencyModel](docs/MarketsBaseCurrencyModel.md)
|
|
271
|
+
|
|
272
|
+
- [MarketsQuoteCurrencyModel](docs/MarketsQuoteCurrencyModel.md)
|
|
273
|
+
|
|
274
|
+
- [MarketsResponseModel](docs/MarketsResponseModel.md)
|
|
275
|
+
|
|
276
|
+
- [Member](docs/Member.md)
|
|
277
|
+
|
|
278
|
+
- [Network](docs/Network.md)
|
|
279
|
+
|
|
280
|
+
- [NetworkDepositInfo](docs/NetworkDepositInfo.md)
|
|
281
|
+
|
|
282
|
+
- [NetworkWithdrawInfo](docs/NetworkWithdrawInfo.md)
|
|
283
|
+
|
|
284
|
+
- [OperationReason](docs/OperationReason.md)
|
|
285
|
+
|
|
286
|
+
- [OperationReasons](docs/OperationReasons.md)
|
|
287
|
+
|
|
288
|
+
- [Order](docs/Order.md)
|
|
289
|
+
|
|
290
|
+
- [OrderBatchResponse](docs/OrderBatchResponse.md)
|
|
291
|
+
|
|
292
|
+
- [OrderBatchResponseError](docs/OrderBatchResponseError.md)
|
|
293
|
+
|
|
294
|
+
- [OrderBatchResult](docs/OrderBatchResult.md)
|
|
295
|
+
|
|
296
|
+
- [OrderCancel](docs/OrderCancel.md)
|
|
297
|
+
|
|
298
|
+
- [OrderCancelReplace](docs/OrderCancelReplace.md)
|
|
299
|
+
|
|
300
|
+
- [OrderCancelReplaceCancelResult](docs/OrderCancelReplaceCancelResult.md)
|
|
301
|
+
|
|
302
|
+
- [OrderCancelReplaceCreateResult](docs/OrderCancelReplaceCreateResult.md)
|
|
303
|
+
|
|
304
|
+
- [OrderCancelReplaceError](docs/OrderCancelReplaceError.md)
|
|
305
|
+
|
|
306
|
+
- [OrderCanceled](docs/OrderCanceled.md)
|
|
307
|
+
|
|
308
|
+
- [OrderCanceledReplaced](docs/OrderCanceledReplaced.md)
|
|
309
|
+
|
|
310
|
+
- [OrderCreateBatchModel](docs/OrderCreateBatchModel.md)
|
|
311
|
+
|
|
312
|
+
- [OrderCreated](docs/OrderCreated.md)
|
|
313
|
+
|
|
314
|
+
- [OrderInstant](docs/OrderInstant.md)
|
|
315
|
+
|
|
316
|
+
- [OrderLimit](docs/OrderLimit.md)
|
|
317
|
+
|
|
318
|
+
- [OrderMarket](docs/OrderMarket.md)
|
|
319
|
+
|
|
320
|
+
- [OrderStop](docs/OrderStop.md)
|
|
321
|
+
|
|
322
|
+
- [OrderStopLimit](docs/OrderStopLimit.md)
|
|
323
|
+
|
|
324
|
+
- [OrderWithoutRemark](docs/OrderWithoutRemark.md)
|
|
325
|
+
|
|
326
|
+
- [OrderbookDepth](docs/OrderbookDepth.md)
|
|
327
|
+
|
|
328
|
+
- [Orders](docs/Orders.md)
|
|
329
|
+
|
|
330
|
+
- [OrdersCancelAll](docs/OrdersCancelAll.md)
|
|
331
|
+
|
|
332
|
+
- [OrdersCancelClientOrderId](docs/OrdersCancelClientOrderId.md)
|
|
333
|
+
|
|
334
|
+
- [OrdersCancelId](docs/OrdersCancelId.md)
|
|
335
|
+
|
|
336
|
+
- [OrdersCancelMarket](docs/OrdersCancelMarket.md)
|
|
337
|
+
|
|
338
|
+
- [OrdersCancelMarketSide](docs/OrdersCancelMarketSide.md)
|
|
339
|
+
|
|
340
|
+
- [OrdersCancelSn](docs/OrdersCancelSn.md)
|
|
341
|
+
|
|
342
|
+
- [OrdersCanceled](docs/OrdersCanceled.md)
|
|
343
|
+
|
|
344
|
+
- [OriginatorOwnExchangeWallet](docs/OriginatorOwnExchangeWallet.md)
|
|
345
|
+
|
|
346
|
+
- [OriginatorOwnPrivateWallet](docs/OriginatorOwnPrivateWallet.md)
|
|
347
|
+
|
|
348
|
+
- [OriginatorThirdPartyExchangeWallet](docs/OriginatorThirdPartyExchangeWallet.md)
|
|
349
|
+
|
|
350
|
+
- [OriginatorThirdPartyPrivateWallet](docs/OriginatorThirdPartyPrivateWallet.md)
|
|
351
|
+
|
|
352
|
+
- [PrimeDeskExecuteQuoteModel](docs/PrimeDeskExecuteQuoteModel.md)
|
|
353
|
+
|
|
354
|
+
- [PrimeDeskExecutionHistoryData](docs/PrimeDeskExecutionHistoryData.md)
|
|
355
|
+
|
|
356
|
+
- [PrimeDeskExecutionHistoryModel](docs/PrimeDeskExecutionHistoryModel.md)
|
|
357
|
+
|
|
358
|
+
- [PublicTrade](docs/PublicTrade.md)
|
|
359
|
+
|
|
360
|
+
- [PublicTrades](docs/PublicTrades.md)
|
|
361
|
+
|
|
362
|
+
- [Quote](docs/Quote.md)
|
|
363
|
+
|
|
364
|
+
- [RequestForQuote](docs/RequestForQuote.md)
|
|
365
|
+
|
|
366
|
+
- [RequestForQuoteByAmount](docs/RequestForQuoteByAmount.md)
|
|
367
|
+
|
|
368
|
+
- [RequestForQuoteByQuantity](docs/RequestForQuoteByQuantity.md)
|
|
369
|
+
|
|
370
|
+
- [RequestForQuoteResponseModel](docs/RequestForQuoteResponseModel.md)
|
|
371
|
+
|
|
372
|
+
- [Rolling24Hr](docs/Rolling24Hr.md)
|
|
373
|
+
|
|
374
|
+
- [Sparkline](docs/Sparkline.md)
|
|
375
|
+
|
|
376
|
+
- [Sparkline400](docs/Sparkline400.md)
|
|
377
|
+
|
|
378
|
+
- [Sparkline400Error](docs/Sparkline400Error.md)
|
|
379
|
+
|
|
380
|
+
- [Sparklines](docs/Sparklines.md)
|
|
381
|
+
|
|
382
|
+
- [SystemTime](docs/SystemTime.md)
|
|
383
|
+
|
|
384
|
+
- [Ticker](docs/Ticker.md)
|
|
385
|
+
|
|
386
|
+
- [TickerWithBest](docs/TickerWithBest.md)
|
|
387
|
+
|
|
388
|
+
- [Trade](docs/Trade.md)
|
|
389
|
+
|
|
390
|
+
- [Trades](docs/Trades.md)
|
|
391
|
+
|
|
392
|
+
- [TradingFee](docs/TradingFee.md)
|
|
393
|
+
|
|
394
|
+
- [TradingFeesResponse](docs/TradingFeesResponse.md)
|
|
395
|
+
|
|
396
|
+
- [Transaction](docs/Transaction.md)
|
|
397
|
+
|
|
398
|
+
- [TransactionalLimit](docs/TransactionalLimit.md)
|
|
399
|
+
|
|
400
|
+
- [TransactionalLimits](docs/TransactionalLimits.md)
|
|
401
|
+
|
|
402
|
+
- [TransactionalLimitsResponse](docs/TransactionalLimitsResponse.md)
|
|
403
|
+
|
|
404
|
+
- [TransactionsResponse](docs/TransactionsResponse.md)
|
|
405
|
+
|
|
406
|
+
- [TravelRuleInfoResponse](docs/TravelRuleInfoResponse.md)
|
|
407
|
+
|
|
408
|
+
- [UnauthorizedError](docs/UnauthorizedError.md)
|
|
409
|
+
|
|
410
|
+
- [UnauthorizedErrorResponse](docs/UnauthorizedErrorResponse.md)
|
|
411
|
+
|
|
412
|
+
- [Withdrawal](docs/Withdrawal.md)
|
|
413
|
+
|
|
414
|
+
- [WithdrawalCreated](docs/WithdrawalCreated.md)
|
|
415
|
+
|
|
416
|
+
- [WithdrawalCrypto](docs/WithdrawalCrypto.md)
|
|
417
|
+
|
|
418
|
+
- [WithdrawalFiat](docs/WithdrawalFiat.md)
|
|
419
|
+
|
|
420
|
+
- [WithdrawalList](docs/WithdrawalList.md)
|
|
421
|
+
|
|
422
|
+
- [WithdrawalTravelRule](docs/WithdrawalTravelRule.md)
|
|
423
|
+
|
|
424
|
+
- [Withdrawals](docs/Withdrawals.md)
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
## About This SDK
|
|
428
|
+
|
|
429
|
+
This SDK was automatically generated using [OpenAPI Generator](https://openapi-generator.tech/).
|
|
430
|
+
|
|
431
|
+
----------
|
|
432
|
+
|
|
433
|
+
> **Note:** This SDK is actively maintained by the Foxbit team. For more information, visit [https://foxbit.com.br](https://foxbit.com.br).
|