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.10.tar.gz (6.9 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.10-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for quickex_sdk-1.0.10.tar.gz
Algorithm Hash digest
SHA256 90e495fcb2d64d2064c9d6ad082972f09aae0531f97e69929087f6808ae543bd
MD5 4b86a1f454ad99846919b12126b154f3
BLAKE2b-256 286094d48e029ec382985f3933912c311e20b8c31f92fbf9037392c2fa5744c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quickex_sdk-1.0.10-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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 07e4a89b9611254f5d78e13dbcb76bc85d74859a36b5d4f56b3678c86dd28a10
MD5 70c1b4cd7b7757bf44c1e5207e884260
BLAKE2b-256 dc42435fb0c680923a2a32b55c222cfd8506b0d2e95c8900aa8e93819fe6e0f1

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