Skip to content

This is a python wrapper to connect to SimpleFX's REST API

Notifications You must be signed in to change notification settings

Jimmy-sha256/SimpleFX_REST_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SimpleFX REST API

This is a python wrapper to connect to SimpleFX's REST API

Table of Contents

  1. Installation
  2. Credentials
  3. List Instruments
  4. Symbol Infomation
  5. Accounts Overview
  6. Account Status
  7. Market Order
  8. Pending Order
  9. Adjust Pending Order
  10. Adjust Take Profit Order
  11. Adjust Stop Loss Order
  12. Delete Pending Order
  13. Close Position
  14. Get Positions / Pending Orders
mkdir SimpleFX && cd SimpleFX

git clone https://github.com/Jimmy-sha256/SimpleFX_REST_API.git 

Add your SimpleFX api access key and access secret to the credentials.py file:

Add either 'DEMO' or 'LIVE' to the credentials.py file

Get a list of available instrumnets

client.list_instrumets()

client.symbol_info('symbol')
Paramaters Type Description
symbol string 'BTCUSD' , 'DJI30'

Retrieve status of all accounts

client.accounts_overview()

Retrieve account status

client.account_status()

client.market_order('symbol', 'side', vol, tp, sl)
Paramaters Type Description
symbol string BTCUSD , DJI30
side string BUY, SELL
vol int number of units to purchase
tp int take profit price
sl int stop loss price

client.pending_order('symbol', 'side', price, vol, tp, sl)
Paramaters Type Description
symbol string BTCUSD , DJI30
side string BUY, SELL
price int price to purchase units
vol int number of units to purchase
tp int take profit price
sl int stop loss price

client.adjust_order(order_id, price, vol, tp, sl)
Paramaters Type Description
order_id int order id number
price int price to purchase units
vol int number of units to purchase
tp int take profit price
sl int stop loss price

Add or adjust the take profit order of an open position.

client.adjust_tp(order_id, tp)
Paramaters Type Description
order_id int order id number
tp int take profit price

Add or adjust the stop loss order of an open postion.

client.adjust_sl(order_id, sl)
Paramaters Type Description
order_id int order id number
sl int stop losstake price

client.delete_order(order_id)
Paramaters Type Description
order_id int order id number

Close a partial or full position

client.close_position(order_id, vol)
Paramaters Type Description
order_id int order id number
vol int number of units to close

client.get_postions()

About

This is a python wrapper to connect to SimpleFX's REST API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages