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

Uploaded Python 3

File details

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

File metadata

  • Download URL: matrad-0.0.7.tar.gz
  • Upload date:
  • Size: 4.9 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.8.6

File hashes

Hashes for matrad-0.0.7.tar.gz
Algorithm Hash digest
SHA256 ffd5825fdb5520985d9cfc4e6d44538c3b25fbb0dc72827efd9a28aaaf24414c
MD5 1f83b143ca342646a7ee9c8e381d0796
BLAKE2b-256 29ab8b89063175cacb945bc0954efa8c05c00eea239b477c9a6553d2bc614495

See more details on using hashes here.

File details

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

File metadata

  • Download URL: matrad-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.8.6

File hashes

Hashes for matrad-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 29a52c3528f6916ce6cdcbcbb589c9f55e9a1e52261859fe94b57e6f1b7eb394
MD5 9becc44cfa167b0dcf13e0f2c5e938cd
BLAKE2b-256 100f3c6bb659345d1b83f8af64f56fdb8f9965434cd06e66a06c15f42a6c4663

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