Bitex-js
Bitex SDK in Javascript
If you prefer to use a custom client, you can get the API documentation at https://developers.bitex.la
Usage
For the examples, we are using ES2017 async/await syntax. For previous versions of the standard, you can safely use Promises.
To see which fields are in each model, please refer to models.js.
For more use cases, you can check out the specs
Initialization
let client = apiKey: 'valid_api_key'
To get your Api Key, please sign up in https://bitex.la and go to https://bitex.la/developers
Table of Contents
- Orderbooks
- Market Data
- Trading
- Movements
- Account
- Deposit/Withdraw
- Buying/Selling Bots
- Merchants
- Api Keys
Orderbooks
/** * Get all Orderbooks. */async
Market Data
/** * Get Market information. * @param */async
Market Ticker
/** * Get tickers of all available orderbooks */async /** * Get ticker of a specific orderbook * @param */async
Get last Transactions
/** * Get transactions. * @param * @param */async /** * Get a specific transaction. * @param */async
Market Candles
/** * Get candles for a specific orderbook * @param * @param * @param */async
Trading
Create Ask
/** * Create an Ask. * An Ask is a Sell order to be executed in the orderbook. * @param * @param * @param */async
Get Asks
/** * Get all own Asks. * @param */async /** * Get a specific Ask. * @param */async
Cancel Ask
/** * Cancel an Ask. * @param */async
Create Bid
/** * Create a Bid. * An Bid is a Buy order to be executed in the orderbook. * @param * @param * @param */async
Get Bids
/** * Get all own Bids. * @param */async /** * Get a specific Bid. * @param */async
Cancel Bid
/** * Cancel a Bid. * @param */async
Get all my Orders
/** * Get own Orders. * Orders are both Bids and Asks. */async
Cancel all my orders
/** * Cancel all Orders. * @param * will cancel all orders in all orderbooks. * Take into account that some or all the Orders could have been matched just * before this request, and therefore the cancel had no effect. It is * recommended to check the status of the Bids and Asks to obtain the final * execution status. */async
Get Trades
/** * Get own trades (Buys & Sells). * @param * @param * @param */async
Get Buys
/** * Get own buys. * @param * @param * @param */ async
Get Sells
/** * Get own sells. * @param * @param * @param */async
Movements
These include Deposits, Withdrawals, Buys and Sells.
/** * Get last movements. */async
Account
Within the account are the current balances, movements and pending movements.
/** * Get account information and balances. */async
Deposit/Withdraw
Get Cash Wallets
/** * Get Cash Wallets and balances. */async /** * Get a specific Cash Wallet. * @param */async
Get Coin Wallets
/** * Get Coin Wallets (with its addresses) and balances */async /** * Get a specific Coin Wallet (with its addresses) and balances. * @param */async
Get Cash Deposits
/** * Get Cash Deposits. */async /** * Get a specific Cash Deposit. * @param */async
Get Coin Deposits
/** * Get Coin Deposits. */async /** * Get a specific Coin Deposit. * @param */async
Create Cash Withdrawal Instructions
/** * Create Withdrawal Instruction * @param * @param * on https://developers.bitex.la/#29243a11-90f1-4b15-9cc8-eec12b550c0b */async
Get Cash Withdrawal Instructions
/** * Get all Withdrawal Instructions. */async /** * Get a specific Withdrawal Instruction. * @param */async
Delete a Cash Withdrawal Instruction
/** * Delete Withdrawal Instruction. * @param */async
Create Cash Withdrawal
/** * Create Cash Withdrawal. * @param * 'UYU'. * @param * @param * @param * Authenticator) */async
Get Cash Withdrawals
/** * Get all Cash Withdrawals. */async /** * Get a specific Cash Withdrawal. * @param */async
Create Coin Withdrawal
/** * Create Coin Withdrawal * @param * @param * @param * @param * @param * Authenticator) */async
Get Coin Withdrawals
/** * Get all Coin Withdrawals. */async /** * Get a specific Coin Withdrawal. * @param */async
Buying/Selling Bots
A Buying or Selling Bot is a bot that performs the action of buying or selling the money you specify in a certain period of time. It divides the amount to buy/sell and performs the actions in smaller chunks, looking for better prices.
Get Buying Bots
/** * Get Buying Bots. */async /** * Get a specific Buying Bot. * @param */async
Create a Buying Bot
/** * Create a Buying Bot. * A Buying Bot will take an amount and an orderbook and will try to buy the * _base_ asset (crypto asset, in general) with the specified amount of the * _quote_ asset (fiat asset, in general). * The strategy used by the buying bot is to buy in little chunks over time * and only if the spread is less than 1%. This prevents the buyer to pay an * abnormal high price. * @example * //Buy 100 USD in BTC * createBuyingBot(100, Orderbooks.BTCUSD) * @param * @param */async
Cancel a Buying Bot
/** * Cancel a Buying Bot. * The orders executed by the bot will not be cancelled, but it won't create * any more. * @param */async
Get Selling Bots
/** * Get Selling Bots. */async /** * Get a specific Selling Bot. * @param */async
Create a Selling Bot
/** * Create a Selling Bot. * A Selling Bot will take an amount and an orderbook and will try to sell the * specified amount of _base_ asset (crypto asset, in general) in order to get * _quote_ asset. * The strategy used by the selling bot is to sell in little chunks over time * and only if the spread is less than 1%. This prevents the seller to get an * abnormal low price. * @example * //Sell 1 BTC into USD * createSellingBot(1, Orderbooks.BTCUSD) * @param * @param */async
Cancel a Selling Bot
/** * Cancel a Selling Bot. * The orders executed by the bot will not be cancelled, but it won't create * any more. * @param */async
Merchants
This section is for stores that accept (or want to accept) BTC as a payment method.
Get Payments
/** * Get all Payments. */async /** * Get a specific Payment. * @param */async
Register a new Payment
/** * Create a new Payment. * @param * @param * take the merchant's general 'keep' configuration or 0 otherwise. * @param * 'CLP', 'PYG' and 'UYU' * @param * payment changes. * @param * @param */async
Create a POS (Point Of Sale)
/** * Create a Point of Sale. * Note: This can be configured manually from the web and is commonly set only * once. Use this method if you are providing a service for multiple * merchants. * @param * @param * @param * @param * @param * merchant. */async
Api Keys
Get Api Keys
/** * Get all Api Keys. */async /** * Get a specific Api Key. * @param */async
Create an Api Key
/** * Create a new Api Key. * @param * will be read-only. @default false. * @param * Authenticator) */async
Revoke an Api Key
/** * Revoke an Api Key. * After doing this action, the Api Key will no longer work. * @param */async
Support
For any issues with the API or this SDK, please reach us at hola@bitex.la