Skip to content

hollaex/hollaex-py-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hollaex-py-lib

Python library for HollaEx Kit enabled exchanges.

This library is specifically for end users and traders to connect to HollaEx Kit exchanges. It connects to HollaEx Pro by default.

Usage

import hollaex

client = hollaex.HollaEx()

You can pass the api-url and base_url of the HollaEx-Enabled exchange to connect to. You can also pass your api_key and api_secret generated from the HollaEx-Enabled exchange.

from hollaex import HollaExAPI

client = HollaExAPI(api_url='<EXCHANGE_API_URL>', 
                       base_url='<EXCHANGE_BASE_URL>', 
                       api_key='<MY_API_KEY>', 
                       api_secret='<MY_API_SECRET>')

You can also pass the field api_expires which is the length of time in seconds each request is valid for. The default value is 60.

Example:

import hollaex

client = hollaex.HollaExAPI(api_url='<EXCHANGE_API_URL>', 
                                base_url_='<EXCHANGE_BASE_URL>', 
                                api_key='<MY_API_KEY>', 
                                api_secret ='<MY_API_SECRET>')

try:
ticker = client.get_ticker(market='xht-usdt')
print('The volume is: ', ticker)
except Exception as e:
print(e)

try:
trades = client.get_trades(symbol='xht-usdt')
print('Public trades: ', trades)
except Exception as e:
print(e)

Available functions:

Command Parameters Description
get_kit Get exchange information e.g. name, valid languages, description, etc.
get_constants Tick size, min price, max price, min size and max size of each symbol pair and coin
get_ticker
  • symbol: HollaEx trading symbol e.g. xht-usdt
Last, high, low, open and close price and volume within the last 24 hours
get_tickers Last, high, low, open and close price and volume within the last 24 hours for all symbols
get_rderbook
  • symbol: HollaEx trading symbol e.g. xht-usdt
Orderbook containing list of bids and asks
get_orderbooks Orderbook containing list of bids and asks for all symbols
get_trades
  • opts: Object with additional params
  • opts.symbol: (optional) HollaEx trading symbol e.g. xht-usdt
List of last trades
get_user User's personal information
get_balance User's wallet balance
get_deposits
  • opts: Object with additional params
  • opts.currency: (optional) Filter data set by asset
  • opts.status: (optional) Filter data set status
  • opts.dismissed: (optional) Filter data set dismissed
  • opts.rejected: (optional) Filter data set rejected
  • opts.processing: (optional) Filter data set processing
  • opts.waiting: (optional) Filter data set waiting
  • opts.limit: (optional, default=50, max=50) Number of items to get
  • opts.page: (optional, default=1) Page number of data
  • opts.orderBy: (optional) Field to order data by
  • opts.order: (optional, enum=[asc, desc]) Specify ascending or descending order
  • opts.startDate: (optional, format=ISO8601) Start date of data set
  • opts.endDate: (optional, format=ISO8601) End date of data set
  • opts.transactionId: (optional) Filter data set by TXID
  • opts.address: (optional) Filter data set by address
User's list of all deposits
get_withdrawals
  • opts: Object with additional params
  • opts.currency: (optional) Filter data set by asset
  • opts.status: (optional) Filter data set status
  • opts.dismissed: (optional) Filter data set dismissed
  • opts.rejected: (optional) Filter data set rejected
  • opts.processing: (optional) Filter data set processing
  • opts.waiting: (optional) Filter data set waiting
  • opts.limit: (optional, default=50, max=50) Number of items to get
  • opts.page: (optional, default=1) Page number of data
  • opts.orderBy: (optional) Field to order data by
  • opts.order: (optional, enum=[asc, desc]) Specify ascending or descending order
  • opts.startDate: (optional, format=ISO8601) Start date of data set
  • opts.endDate: (optional, format=ISO8601) End date of data set
  • opts.transactionId: (optional) Filter data set by TXID
  • opts.address: (optional) Filter data set by address
User's list of all withdrawals
make_withdrawal
  • currency: Currency code e.g. xht
  • amount: Withdrawal amount
  • address: Address to withdrawal to
  • opts: Object with additional params
  • opts.network: (required if asset has multiple networks) Blockchain network to create address for e.g. trx
Create a new withdrawal request
get_user_trades
  • opts: Object with additional params
  • opts.symbol: (optional) HollaEx trading symbol e.g. xht-usdt
  • opts.limit: (optional, default=50, max=50) Number of items to get
  • opts.page: (optional, default=1) Page number of data
  • opts.orderBy: (optional) Field to order data by
  • opts.order: (optional, enum=[asc, desc]) Specify ascending or descending order
  • opts.startDate: (optional, format=ISO8601) Start date of data set
  • opts.endDate: (optional, format=ISO8601) End date of data set
User's list of all trades
get_order
  • orderId: HollaEx Network Order ID
Get specific information about a certain order
get_orders
  • opts: Object with additional params
  • opts.symbol: (optional) HollaEx trading symbol e.g. xht-usdt
  • opts.side: (optional, enum=[buy, sell]) Order side
  • opts.status: (optional) Filter data set status
  • opts.limit: (optional, default=50, max=50) Number of items to get
  • opts.page: (optional, default=1) Page number of data
  • opts.orderBy: (optional) Field to order data by
  • opts.order: (optional, enum=[asc, desc])
  • opts.startDate: (optional, format=ISO8601) Start date of data set
  • opts.endDate: (optional, format=ISO8601) End date of data set
Get the list of all user orders. It can be filter by passing the symbol
create_order
  • symbol: HollaEx trading symbol e.g. xht-usdt
  • side (enum=[buy, sell]): Order side
  • size: Size of order to place
  • type: (enum=[market, limit] Order type
  • price: (required if limit order type) Order price
  • opts: Object with additional params
  • opts.stop: (optional) Stop price for order
  • opts.meta: (optional) Object with additional meta configurations
  • opts.meta.post_only: (optional, default=false) Make post only order
  • opts.meta.note: (optional) Custom note for order
Create a new order
cancel_order
  • orderId: HollaEx Network order ID
Cancel a specific order with its ID
cancel_all_orders
  • symbol: HollaEx trading symbol e.g. xht-usdt
Cancel all the active orders of a user, filtered by currency pair symbol

Releases

No releases published

Packages

No packages published

Languages