Skip to main content

a Package to communicate with Tabdeal platform

Project description

Package

PyPI Status Python Version Poetry Release to PyPI status PyPI - Implementation PyPI - Wheel Maintenance - intended

Documentation

Documentation Status

Tests

Nox CodSpeed pre-commit.ci status PyPI - Types Coverage status Analyzed with Synk OpenSSF Scorecard SonarQube Quality Gate

Linters

Ruff pre-commit MegaLinter status Checked with MyPy Linting with Pylint

License

License

Stats

Contributors Stars Total Downloads GitHub Issues GitHub Pull Requests GitHub commit activity SonarQube Lines of Code SonarQube Reliability Rating SonarQube Security Rating SonarQube Maintainability Rating SonarQube Technical Debt SonarQube Vulnerabilities SonarQube Bugs SonarQube Code Smells

Misc

Contributor Covenant Digital Object Identifier Skeleton Open Source Security Foundation Best Practices Badge

a Package to communicate with Tabdeal platform

Features

  • Transfer USDT to/from margin asset from/to account balance

  • Get account USDT balance

  • Get order state

  • Get history of all orders

  • Get all open orders

  • Open margin order

  • Set SL/TP for margin order

  • Proper exception handling

Requirements

  • aiohttp

Installation

You can install unofficial tabdeal api via pip from PyPI:

pip install unofficial-tabdeal-api

Usage

First, obtain the Authorization key and user-hash:

  • On a computer, open your internet browser and log-in to Tabdeal website

  • Navigate to settings page

  • Press F12 to open Developer tools

  • Navigate to Network panel

  • Refresh the website page and the network section should populate with many entries

  • Find the entry with wallet/ name

  • Select it and in Headers section, under Request Headers, you should find them

Now initialize the TabdealClient with your information and do as you wish :)

# Import requirements and TabdealClient
import aiohttp
from unofficial_tabdeal_api import TabdealClient

async def main():

    # Initialize aiohttp.ClientSession asynchronously
    async with aiohttp.ClientSession() as client_session:

        # Create a TabdealClient object inside the async wrap
        my_client: TabdealClient = TabdealClient(USER_HASH, USER_AUTHORIZATION_KEY, client_session)

        # Run your desired commands, remember to `await` the methods as all of them (except a few) are asynchronous
        bomeusdt_asset_id = await my_client.get_margin_asset_id("BOMEUSDT")

Learn more at the Documentation.

Issues

If you encounter any problems, please file an issue along with a detailed description.

TODO

License

Distributed under the terms of the MIT license, unofficial tabdeal api is free and open source software.

Contributing

Contributions are welcome. To learn more, see the Contributor Guide.

Credits

This project was created with the help of @cjolowicz’s Hypermodern Python Cookiecutter template and @fpgmaas’s Cookiecutter Poetry template.

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

unofficial_tabdeal_api-0.2.4.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

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

unofficial_tabdeal_api-0.2.4-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file unofficial_tabdeal_api-0.2.4.tar.gz.

File metadata

  • Download URL: unofficial_tabdeal_api-0.2.4.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for unofficial_tabdeal_api-0.2.4.tar.gz
Algorithm Hash digest
SHA256 536cb87fe7ac42a8787246a94eca8fd6d146be8aff0ba34533e43bb82db82f7b
MD5 c4425c9459d3187ff9fee9427716b388
BLAKE2b-256 b482b16b5e12f9f6e0263984e83d0d9886a9419b0a53d1df867b1b9abf57ccb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for unofficial_tabdeal_api-0.2.4.tar.gz:

Publisher: release-packge.yml on MohsenHNSJ/unofficial_tabdeal_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file unofficial_tabdeal_api-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for unofficial_tabdeal_api-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e89940148e8ed688684c0b09366ab4f99dee5f7bc4d013f3901baed4c57bf13a
MD5 c7e67a2511f20cc653b59a624963f7e8
BLAKE2b-256 0441603691d6b0469f49b4ad1a41cbafcf5df1ca16c22859ac5587a15956b554

See more details on using hashes here.

Provenance

The following attestation bundles were made for unofficial_tabdeal_api-0.2.4-py3-none-any.whl:

Publisher: release-packge.yml on MohsenHNSJ/unofficial_tabdeal_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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