Skip to main content

A Python interface to the Binance API

Project description

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"
}

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

matrad-0.0.4.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

matrad-0.0.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file matrad-0.0.4.tar.gz.

File metadata

  • Download URL: matrad-0.0.4.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for matrad-0.0.4.tar.gz
Algorithm Hash digest
SHA256 268b3062156b3a05bc558bd97cc3929eb29bafcb120a6af7f787d1173d24589c
MD5 657723904957ed4738970ee46d357e68
BLAKE2b-256 1363d0d655951c6c53c0493cf0dcdaa806b97e777c3f99a1efcd915a14a2c6da

See more details on using hashes here.

File details

Details for the file matrad-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: matrad-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for matrad-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 372d022fccd1e63d0bccf2603ee4d5db4720a2ca5bed576b82f68118954adc00
MD5 064e4c641bf848e890d44dc6c41efe49
BLAKE2b-256 a0d8a36a62cb9a72a42504a6c5c1373e3ac495de60b63d795f8d420399161839

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