Skip to main content

Official TheRockTrading Python Library to comunicate with JSON REST API

Project description

The Rock Trading Python Library

TheRockTrading Python Library to communicate with JSON REST API (current version -> v1)

Features

  • Official implementation
  • Place orders
  • Wallet managment
  • Market data

Installation

pip:

pip install py-therocktrading-api

Quickstart

Register an account with The Rock Trading or The Rock Trading Staging.

Go to settings page and get the API and APY SECRET keys. If you want to use the staging set staging=True.

from TheRockTrading import Client

trt = Client(API='API', API_SECRET='API_SECRET', staging=False)

trt.currencies()

Examples

  • Get orderbook
trt.orderbook('BTCEUR')
  • Get all tickers
trt.tickers()
  • Get balance for all coin
trt.balances()
  • Place an order
#market order
trt.place_order(fund_id='BTCEUR', 
		side='buy', 
		amount='1')
		
#limit order
trt.place_order(fund_id='BTCEUR', 
		side='buy', 
		amount='1', 
		price='60000')

#with a condition es: stop_loss or take_profit
trt.place_order(fund_id='BTCEUR', 
		side='buy', 
		amount='1', 
		price='60000'
		conditional_type='stop_loss',
		conditional_price='55000')
  • Withdraw
trt.balances(currency='BTCEUR', 
	     destination_address='address'
	     amount=1)

You can find the full documentation for the endpoints here

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

py-therocktrading-api-1.1.4.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

py_therocktrading_api-1.1.4-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file py-therocktrading-api-1.1.4.tar.gz.

File metadata

  • Download URL: py-therocktrading-api-1.1.4.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for py-therocktrading-api-1.1.4.tar.gz
Algorithm Hash digest
SHA256 1d9989ffa0290896ba33d3f6e0befbda7c9ac9d4d14645c9c97374bff9f79ef6
MD5 7eff9388017383aad9bc945bcd81c658
BLAKE2b-256 01a258c710cbd370264ba9c1a85e97925d71310091619fff367dfe0e065cce36

See more details on using hashes here.

File details

Details for the file py_therocktrading_api-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for py_therocktrading_api-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2dc1e841a885bf644504e0d3e11b23ce52a47ba9703fac1d6254bfa4863f48b4
MD5 f0ff701d3b9af81fb5d4394f31dcc330
BLAKE2b-256 23cd270bb78f0700384f739d6dd9f5510c5bb08673ca21e553f09aa6aeb4d88a

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