a Package to communicate with Tabdeal platform
Project description
Package |
|
|---|---|
Documentation |
|
Tests |
|
Linters |
|
License |
|
Stats |
|
Misc |
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
Fix missing library stubs or py.typed marker MyPy-import-untyped.
Improve documentation for setup and usage.
Use python built-in TypeGuard (3.10+) as a pre-processor on server responses to mitigate Type issues. (TypeGuard example) (Type Narrowing)
Configure Sphinx thoroughly.
Tidelift?
Automatic stub generation and stub testing (stubgen & stubtest)
Sharded benchmarking (Pytest parallel benching | Github parallel benching)
Use https://shields.io/badges/git-hub-deployments for showing deployment status
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
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
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 unofficial_tabdeal_api-0.2.1.tar.gz.
File metadata
- Download URL: unofficial_tabdeal_api-0.2.1.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09ebe32423f2469a4813943716df13841f33555c757120da44dc7bf76371e8dd
|
|
| MD5 |
dc1783c2d45da0d8aa047abcd147ee89
|
|
| BLAKE2b-256 |
66bf23ba2a96db9847698eb84438f6e4e77267dac9a6fbf61a6984c6906fe968
|
Provenance
The following attestation bundles were made for unofficial_tabdeal_api-0.2.1.tar.gz:
Publisher:
release-packge.yml on MohsenHNSJ/unofficial_tabdeal_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unofficial_tabdeal_api-0.2.1.tar.gz -
Subject digest:
09ebe32423f2469a4813943716df13841f33555c757120da44dc7bf76371e8dd - Sigstore transparency entry: 233309348
- Sigstore integration time:
-
Permalink:
MohsenHNSJ/unofficial_tabdeal_api@720fbe008c6afab1a5ace3a12c6a925eda851a7d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MohsenHNSJ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-packge.yml@720fbe008c6afab1a5ace3a12c6a925eda851a7d -
Trigger Event:
push
-
Statement type:
File details
Details for the file unofficial_tabdeal_api-0.2.1-py3-none-any.whl.
File metadata
- Download URL: unofficial_tabdeal_api-0.2.1-py3-none-any.whl
- Upload date:
- Size: 26.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c35f225c48968380943137e071ac5c746ede424b300d91a19b066a3bef947878
|
|
| MD5 |
f843160ee33c2cb33bf7bdbd3c80b9d2
|
|
| BLAKE2b-256 |
35a77a2aa3f59f9365d39d465be8b273c5a475478ee371fc33c5a61eb89fd0a0
|
Provenance
The following attestation bundles were made for unofficial_tabdeal_api-0.2.1-py3-none-any.whl:
Publisher:
release-packge.yml on MohsenHNSJ/unofficial_tabdeal_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unofficial_tabdeal_api-0.2.1-py3-none-any.whl -
Subject digest:
c35f225c48968380943137e071ac5c746ede424b300d91a19b066a3bef947878 - Sigstore transparency entry: 233309360
- Sigstore integration time:
-
Permalink:
MohsenHNSJ/unofficial_tabdeal_api@720fbe008c6afab1a5ace3a12c6a925eda851a7d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MohsenHNSJ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-packge.yml@720fbe008c6afab1a5ace3a12c6a925eda851a7d -
Trigger Event:
push
-
Statement type: