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.2.tar.gz (2.0 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.2-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: matrad-0.0.2.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using 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.9.1

File hashes

Hashes for matrad-0.0.2.tar.gz
Algorithm Hash digest
SHA256 51bb355ac8c39aa4f4bfef8f4888a36fc62972a775d7e7473735e07e08b48538
MD5 586d4b1639ba2e244b3bedc77c5a18fc
BLAKE2b-256 8115c3383d61937c5f9e551fd9691372d72f67bfcaec341eb8203c8e67e0898e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: matrad-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using 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.9.1

File hashes

Hashes for matrad-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 510926ce63c58f63341649ae2a61138b8f38379db4b6be1ff44f9f74deba18e5
MD5 51c8ac3e9bc276d95c0895552894eac5
BLAKE2b-256 1d7ab7e7ec2e9dd7b1109dc1d68074b8bb638c098360ec98a2ed25b69d320f5c

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