0.0.13 • Published 3 years ago

bitso-bert-api v0.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Getting started

The first step will be to get your API Keys (for private endpoints). In order to get your API Keys, please refer to their documentation

You will need the following environment variables in your project

BITSO_API_KEY=""
BITSO_API_SECRET=""
BITSO_API_URL="https://api.bitso.com"

When working on integrations, bitso recommends that you use their dev server before running your code against production. The URL for this server is https://api-dev.bitso.com/v3/

npm install bitso-bert-api

usage

try {
  const ticker = await BitsoApi.public.getTicker('btc_mxn')
  const { book, last, volume, low, high } = ticker
} catch (err) {
  const { code, message } = err
}

Rate Limits

Rate limits are based on one minute windows. For public API requests, the limit is by IP address and allows 60 requests per minute. For private API requests, the limit is by user and allows 300 requests per minute. If you exceed these limits, you will get locked out for one minute. Continuous one minute lockouts may result in a 24-hour block. Order cancellations aren’t subject to API rate limiting.

Implemented REST API

The API is divided in two sections: public, private and undocumented

Public API
Available BooksgetAvailableBooks()
TickergetTicker('btc_mxn')
Order BookgetOrderBook('btc_mxn', params?){ aggregate?: boolean }
TradesgetTrades('btc_mxn', params?){ marker?: string, sort?: 'asc'\|'desc', limit?: number }
Private API
🔒Account StatusgetAccountStatus()
🔒Document Upload☑️
🔒Mobile Phone Number RegistrationmobilePhone.register(phoneNumber)
🔒Mobile Phone Number VerificationmobilePhone.verify(verificationCode)
🔒Account BalancegetBalance()
🔒FeesgetFees()
🔒Ledger
🔒- allledger.getLedger(params?){ marker?: string, sort?: 'asc'\|'desc', limit?: number }
🔒- tradesledger.getTrades(params?){ marker?: string, sort?: 'asc'\|'desc', limit?: number }
🔒- feesledger.getFees(params?){ marker?: string, sort?: 'asc'\|'desc', limit?: number }
🔒- fundingsledger.getFundings(params?){ marker?: string, sort?: 'asc'\|'desc', limit?: number }
🔒- withdrawalsledger.getWithdrawals(params?){ marker?: string, sort?: 'asc'\|'desc', limit?: number }
🔒Withdrawals
🔒- allwithdrawals.getAll(params?){ marker?: string, limit?: number, status?: string, method?: string }
🔒- by widwithdrawals.getByWid(wid)
🔒- by widswithdrawals.getByWids(wid1, wid2)
🔒- by origin_idswithdrawals.getByOriginIds(originId1, originId2)
🔒Fundings
🔒- allfundings.getAll(params?){ marker?: string, limit?: number, status?: string, method?: string, txids?: string }
🔒- by fidfundings.getByFid(fid)
🔒- by fidsfundings.getByFids(fid1, fid2)
🔒User Trades
🔒- by bookuserTrades.getByBook('btc_mxn', params?){ marker?: string, sort?: 'asc'\|'desc', limit?: number }
🔒- by iduserTrades.getByTid(tid)
🔒- by idsuserTrades.getByTids(tid1, tid2)
🔒Order Trades
🔒- by oidorderTrades.getByOid(oid)
🔒- by origin idorderTrades.getByOriginId(originId)
🔒Open OrdersgetOpenOrders(params?){ marker?: string, sort?: 'asc'\|'desc', limit?: number, book?: Book }
🔒Lookup Orders
🔒- by oidlookupOrders.getByOid(oid)
🔒- by list of oidslookupOrders.getByOids(oid1, oid2)
🔒- by list of origin_idslookupOrders.getByOriginIds(originId1, originId2)
🔒Cancel Order
🔒- allcancelOrder.cancelAll()
🔒- by oidcancelOrder.cancelByOid(oid)
🔒- by list of oidscancelOrder.cancelByOids(oid1, oid2)
🔒- by list of origin_idscancelOrder.cancelByOrderIds(originId1, originId2)
🔒Place an Order (buy, sell)
🔒- marketmarket(book, amount, currency)
🔒- limitlimit(book, amount, currency, price, executionType?)executionType = 'goodtillcancelled' \| 'fillorkill' \| 'immediateorcancel' \| 'postonly'
🔒- stopLossstopLoss(book, amount, stopPrice)
🔒- stopLimitstopLimit(book, amount, currency, price, stopPrice, executionType?)executionType = 'goodtillcancelled' \| 'fillorkill' \| 'immediateorcancel' \| 'postonly'
🔒Funding DestinationgetFundingDestination(currency)
🔒Crypto Withdrawals☑️
🔒SPEI Withdrawal☑️
🔒Bank CodesgetBankCodes()
🔒Debit Card Withdrawal☑️
🔒Phone Number Withdrawal☑️
Undocumented API
Charts
- Charting Informationcharts.getChartInfo(book, timeBucket, startDate, endDate)
- Charting Tradescharts.getChartTrades(book, timeframe)
Catalogues
- Available Currency Conversionscatalogues.availableCurrencyConversions.public()
🔒- Available Currency Conversionscatalogues.availableCurrencyConversions.private()
- Countriescatalogues.getCountries()
- Currenciescatalogues.getCurrencies()
🔒TickersgetTickers()
🔒SettingsgetSettings()
0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago