Skip to main content

MATRAD: a Python trading interfance for Binance

Mantrad enables you to interact with the Binance API with Python

Installation

pip install matrad

API Functions available

The available API functions with their properties (especially endpoint and method) are listed properties.endpoint_mapping.

Call a function

from utils import execute_query
execute_query(function_name, params, data)

where function_name is a key in properties.endpoint_mapping, data is a Dict corresponding to the query string arguments and params a Dict corresponding to th request body.

Other utilities

Your current timestamp

You can get your current rimestam through utils.get_current_timestamp(). Is useful for timing your trades.

Signature

Some API function require a signature to proceed. This is handles seamlessly by utils.execute_query() through utils.get_hashmap_signature().

Coin pairs

All the coin pairs handled by the Binance API can be generated or updated locally through utils.update_pair_list() and returned by utils.get_all_pairs().

Compare API urls

The API url are listed in properties.urls. Their ping speed can be compred through utils.get_urls_speeds().

API keys

Your API key and secret must be stored in the user home directory in a file called .binance_api_secrets in this format:

{
    "key": "aBccc",
    "secret": "xYzzz"
}

Metadata

Release files for matrad 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matrad 0.0.7
File Size Uploaded Provenance
matrad-0.0.7.tar.gz 4.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for matrad 0.0.7
File Interpreter ABI Platform
matrad-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / matrad-0.0.7.tar.gz

Download URL matrad-0.0.7.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ffd5825fdb5520985d9cfc4e6d44538c3b25fbb0dc72827efd9a28aaaf24414c
BLAKE2b-256 checksum
How to use checksums
29ab8b89063175cacb945bc0954efa8c05c00eea239b477c9a6553d2bc614495
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

Release files / matrad-0.0.7-py3-none-any.whl

Download URL matrad-0.0.7-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29a52c3528f6916ce6cdcbcbb589c9f55e9a1e52261859fe94b57e6f1b7eb394
BLAKE2b-256 checksum
How to use checksums
100f3c6bb659345d1b83f8af64f56fdb8f9965434cd06e66a06c15f42a6c4663
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

Security for matrad 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page