Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jordanbaucke
Created June 19, 2013 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordanbaucke/5816817 to your computer and use it in GitHub Desktop.
Save jordanbaucke/5816817 to your computer and use it in GitHub Desktop.
bfx-python-example-run
from bitfinex import Bitfinex
import os
with open(os.path.expanduser('~/.bfx_test_account_key.txt'), 'r') as f:
KEY, SECRET = f.read().strip().splitlines()
print (KEY, SECRET)
bfx = Bitfinex()
bfx.key = KEY
bfx.secret = SECRET
print '\n-- TICKER'
print bfx.ticker()
#print '\n-- TODAY'
#print bfx.today()
print '\n-- SYMBOLS'
print bfx.symbols()
print '\n-- BOOK'
print bfx.book({})
print '\n-- TRADES'
print bfx.trades({})
#print '\n-- ORDER NEW'
#print bfx.order_new({ })
#print '\n-- ORDER CANCEL'
#print bfx.order_cancel({ })
#print '\n-- ORDER STATUS'
#print bfx.order_status({ })
print '\n-- ORDERS'
print bfx.orders()
print '\n-- BALANCES'
print bfx.balances()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment