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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page