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="changeme", api_secret="changeme")
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.11.tar.gz
(6.9 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.11.tar.gz.
File metadata
- Download URL: quickex_sdk-1.0.11.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb36f2f24502e57c8d166bebf44548369b23d6311e253b56a2749f0e8fd8ed0d
|
|
| MD5 |
e1f107bfc1ef56a8af4a3b768cb157f9
|
|
| BLAKE2b-256 |
c0d227b84a6558a2a2a8e4e316dd4eb6fe9640a39c0d2116784967a7f602bff4
|
File details
Details for the file quickex_sdk-1.0.11-py3-none-any.whl.
File metadata
- Download URL: quickex_sdk-1.0.11-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 |
9a204ef669ca31bbabcc0492f4af34f0b2e7c29b138e1ff5fc10ff3146cc7508
|
|
| MD5 |
6e93987a37a223049163624737eb0166
|
|
| BLAKE2b-256 |
c150cc212d0db019140dcab6ccab2458675410d3bdbad691e4bd68cf68bbbc52
|