Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.71 KB

README.md

File metadata and controls

57 lines (47 loc) · 1.71 KB

BittrexTools

A very basic set of API functions to be used with Bittrex API v3. Only covers the bare minimum required to setup a simple bot or controls. No tests and haven't tested if install grabs dependencies after splitting off of main bot project. See EOF for very short dependency list.

Inital Use

Create btxConn object

btxConn = BittrexConnection(apiKey, apiSecret, apiBaseURL='https://api.bittrex.com/v3')
  • BaseURL is the url to the api. Defaults to https://api.bittrex.com/v3 but is an option in case of future changes.

    Methods

    Here are available methods including any optional args defaults.

    Get current fee rate

    btxConn.get_current_fee_rate()
    
  • Returns a float.
  • Does comparison using current volume.
  • !!!Does not automatically update if Bittrex changes their fee rates

    Send a get request

    get_any(uriEnding, content='')
    
  • Returns a parsed json object
  • uriEnding should match Bittrex's documentation, including any slashes

    Place an order

    btxConn.place_order(
        marketSymbol,
        direction, 
        orderLimit='', 
        quantity='', 
        orderType='LIMIT', 
        ceiling='', 
        timeInForce='GOOD_TIL_CANCELLED', 
        clientOrderId='', 
        useAwards='FALSE', 
        content = ""
        )
    
  • Defaults allow for minimal limit orders but should be useable for any supported kind of order.
  • Returns a parsed json object

    Delete an order

    btxConn.delete_order(uuid)
    
  • Returns a parsed json object

    Dependencies

  • hashlib
  • time
  • hmac
  • requests
  • json