GithubHelp home page GithubHelp logo

crypto's Introduction

crypto
======

Python class for interacting with the crypto-trade api


Simple class for interacting with the crypto-trade api.
For full usage make sure to check the crypto trade api documentaion.
https://www.crypto-trade.com/api/documentation

I'll be working on better functrions for some of the examples outlined below.


#Example placing an order  		
cryp.req('trade',{"pair":"ltc_btc","type":"Buy","amount":ltc_bid_amount,"rate":price_to_bid})		
						
#Example Cancelling an order
cryp.req('cancelorder',{"orderid":order_id})

#Example Get Funds
account_info=cryp.req('getinfo')

orig_crypto_ltc_amount=float(account_info['data']['funds']['ltc'])
orig_crypto_btc_amount=float(account_info['data']['funds']['btc'])
orig_crypto_usd_amount=float(account_info['data']['funds']['usd'])


#Example Get and Cancel Last Two Days of Orders
unix_time_lag=int(time.time()-166400)
for order in cryp.req('ordershistory',{'start_date':unix_time_lag})['data']:
	if  order["status"]=="Active" or order["status"]=='Partly Completed':
		cryp.req('cancelorder',{"orderid":int(order["id"])})


Donations
BTC : 115biJEmRzBetyo8MB3epR3ahJpdKLv6Er
LTC : LPRjrB2jivoi1keoAUcQSghepyipZ1wfhG

crypto's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.