Welcome to bitme’s documentation!

bitme - BitMe API

class bitme.BitmeAPI(apikey, apisecret=None)

A BitMe API Client implementation

_query(url, params={}, auth=False, method='GET')

General query function for API

Parameters:
  • url – URL suffix to append to API_URLROOT (eg. ‘/accounts’)
  • params – dictionary of params to include in query string or post data
  • auth – Whether this is an authenticated request
  • method – The request type (‘GET’ or ‘POST’)
accounts()

Get account listing, including balances

bitcoin_address()

Get your own bitcoin address at BitMe

cancel_order(uuid)

Cancel an order with a given UUID

Parameters:uuid – The UUID to use (eg. 28330971-6b4e-46b8-be55-9a413774f290)
create_order(order_type_cd, quantity, rate, currency_pair='LTCBTC')

Create a new order

Parameters:
  • order_type_cd – The order type (‘BID’ or ‘ASK’)
  • quantity – The quantity of the units to be transacted
  • rate – The rate at which the order will be executed
  • currency_pair – The currency pair to use for the order
get_compat_orderbook(currency_pair='LTCBTC')

Gets the current Bitcoincharts-compatible orderbook for a given currency pair.

Parameters:currency_pair – The currency pair to pull
get_compat_trades(currency_pair='LTCBTC')

Gets the current Bitcoincharts-compatible trade array for a given currency pair.

Parameters:currency_pair – The currency pair to pull
get_order(uuid)

Gets an order with a given UUID

Parameters:uuid – The UUID to use (eg. 28330971-6b4e-46b8-be55-9a413774f290)
get_orderbook(currency_pair='LTCBTC')

Gets the current full orderbook for a given currency pair.

Parameters:currency_pair – The currency pair to pull
get_transaction(txid)

Gets a transaction with a given id

Parameters:txid – The Transaction ID (eg. ‘100’)
get_transactions(currency_cd='BTC', limit=10, order_by='DESC', page='1')

Gets a list of transactions

Parameters:
  • currency_cd – The currency code (eg. ‘BTC’)
  • limit – The maximum number to return
  • order_by – How to order the results (‘ASC’ or ‘DESC’)
  • page – Page number, starting from 1
open_orders()

Get a list of open orders

verify_credentials()

Verify credentials work

bitme_internal - BitMe Internal Helper Functions

bitme_internal.datetime_to_timestamp(dt)

Converts a datetime object to UTC timestamp

bitme_internal.utc_mktime(utc_tuple)

Returns number of seconds elapsed since epoch Note that no timezone are taken into consideration. utc tuple must be: (year, month, day, hour, minute, second)

Indices and tables

Table Of Contents

This Page