quickex-sdk 1.0.11

Last updated:

0 purchases

quickex-sdk 1.0.11 Image
quickex-sdk 1.0.11 Images
Add to Cart

Description:

quickexsdk 1.0.11

Quickex SDK



Table of Contents

Installation
License

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.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.