Skip to main content

Python SDK for the Quickex HTTP API

Project description

Quickex SDK

PyPI - Version PyPI - Python Version


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


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.7.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quickex_sdk-1.0.7-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file quickex_sdk-1.0.7.tar.gz.

File metadata

  • Download URL: quickex_sdk-1.0.7.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for quickex_sdk-1.0.7.tar.gz
Algorithm Hash digest
SHA256 440551df14b5db793592cac27950f4c2885d170aed6ee68733ee32ec9f302ccb
MD5 571acb4018ee83a30bcadf89009ec364
BLAKE2b-256 ac98aca6808c5d8537b17621811b7c420a9450920b57aff7b175df3a4191f150

See more details on using hashes here.

File details

Details for the file quickex_sdk-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: quickex_sdk-1.0.7-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

Hashes for quickex_sdk-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f63591b9ca3ba4bb8dbad2338b5f60a74a3ef5ea522696703fe48149dce99813
MD5 a56ddf9de4b11062ce21423e00db67e8
BLAKE2b-256 bcfbe354e2d5aa07a1de823fd53382aa4b87b2427a2dbfd01303ea86cb4d43be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page