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.8.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.8.tar.gz.
File metadata
- Download URL: quickex_sdk-1.0.8.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 |
4c0b93f121fbc2d1f3876201c8cc2b01ba3d770d054ac4a364b15493beb1167d
|
|
| MD5 |
8b6818b901fecd01f67c18cd507ed250
|
|
| BLAKE2b-256 |
c25fb80a2eb274db4b533333637368d8667fa340a2293198b4c586dad5c65a68
|
File details
Details for the file quickex_sdk-1.0.8-py3-none-any.whl.
File metadata
- Download URL: quickex_sdk-1.0.8-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 |
70fc64a4a60e7998cf9c25c0d2de53beb678c466227030967812145fa5ff5fd0
|
|
| MD5 |
1fa7f79d815bd00197db003b2613acdf
|
|
| BLAKE2b-256 |
cb465c83a3cbcb8dc9a5aa41d051ddd48ca8f9e724812b03974a651dd9d764d4
|