Python SDK for the Quickex HTTP API
Project description
Quickex SDK
Table of Contents
Installation
pip install quickex-sdk
Usage
config = Config(api_url="https://quickex.io", api_public="public", api_secret="secret")
sdk = QuickexSDK(config)
Get instrument
res = InstrumentReq(currencyTitle="USDT", networkTitle="TRC20")
instrument = sdk.get_instrument(res)
Get rate
res = RateReq(
instrumentFromCurrencyTitle="BTC",
instrumentFromNetworkTitle="BTC",
instrumentToCurrencyTitle="USDT",
instrumentToNetworkTitle="TRC20",
claimedDepositAmount="10000",
rateMode="FLOATING",
claimedDepositAmountCurrency="USDT",
markup="1.0",
)
rate = sdk.get_rate(res)
Create order
res = RateReq(
instrumentFromCurrencyTitle="BTC",
instrumentFromNetworkTitle="BTC",
instrumentToCurrencyTitle="USDT",
instrumentToNetworkTitle="TRC20",
claimedDepositAmount="10000",
rateMode="FLOATING",
claimedDepositAmountCurrency="BTC",
markup="0.3",
)
rate = sdk.get_rate(res)
public_rate = ClaimedPublicRate(
claimedAmountToReceive=rate.amountToGet,
finalNetworkFeeAmount=rate.finalNetworkFeeAmount,
platformFee_Absolute=rate.platformFee_Absolute,
price=rate.price,
quotes=rate.quotes,
updatedAt=rate.updatedAt,
)
req = CreateOrderReq(
instrumentFrom=rate.instrumentFrom,
instrumentTo=rate.instrumentTo,
destinationAddress='TFe5tdqSy8CMGMDVHPJHLTK8hrAL6ddUpD',
destinationAddressMemo=None,
refundAddress=None,
refundAddressMemo=None,
claimedPublicRate=public_rate,
claimedNetworkFee=rate.finalNetworkFeeAmount,
legacyOrderId=None,
referrerId=None,
claimedDepositAmount=rate.amountToGive,
rateMode="FLOATING",
markup=rate.markup,
)
new_order = sdk.create_order(req)
License
quickex-sdk is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
quickex_sdk-1.0.9.tar.gz
(7.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quickex_sdk-1.0.9.tar.gz.
File metadata
- Download URL: quickex_sdk-1.0.9.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7288f503732b36c3816a2a69eaf14b748c351eac02bc64b0cbe01ad76bd8819f
|
|
| MD5 |
f6e430eb2c97a871f5fb6c58907525bb
|
|
| BLAKE2b-256 |
7affef357f9e0a509024d0815c828d880cd19d1c2941222fecaee87fe49445b5
|
File details
Details for the file quickex_sdk-1.0.9-py3-none-any.whl.
File metadata
- Download URL: quickex_sdk-1.0.9-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fb6a7186ebc08494e38e68a61c77313d9e3cda152d222312fdb50c4f0d0862a
|
|
| MD5 |
4bfe6a01de9da697514a41a09dd51861
|
|
| BLAKE2b-256 |
2836b10213c7e5f955d47c06232d495122b35edea43eb0c83440f7d538334f96
|