The Bitstamp API Client foi updated para include novos recursos e API endpoints. Veja abaixo uma lista de o main features implemented:
- REST Public API: Tickers, Livro de Ordens, Transactions e Market Info
- REST Private API: Account balance, orders e withdrawals.
- WebSocket Private Inscrições: Orders e Trades.
REST API
REST API Public Methods
Tickers
- GetCurrencies: View that retorna list de all currencies com basic data.
- GetAllCurrencyPairsTickers: Return ticker data para all currency pairs. Passing any GET parâmetros, will result em your request being rejected.
- GetCurrencyPairTicker: Return ticker data para o requested currency pair. Passing any GET parâmetros, will result em your request being rejected.
- GetHourlyTicker: Return hourly ticker data para o requested currency pair. Passing any GET parâmetros, will result em your request being rejected.
Livro de Ordens
- GetOrderBook: Retorna livro de ordens data.
Transactions
- GetTransactions: Return transaction data um partir de um given time frame.
Market Info
- GetEURUSDConversionRate: Return EUR/USD conversion rate.
- GetOLHCData: View that retorna OHLC (Abrir High Low Fechar) data em api request.
- GetTradingPairsInfo: Return trading pairs info.
Account Balance
- GetAccountBalances: Return account balances.
- GetAccountBalanceForCurrency: Return account balances para currency.
Orders
- BuyInstantOrder: Abrir um buy instant order. By placing um instant order you acknowledge that o execution de your order depends no market conditions e that these conditions may be subject para sudden changes that cannot be foreseen. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- BuyMarketOrder: Abrir um buy market order. By placing um market order you acknowledge that o execution de your order depends no market conditions e that these conditions may be subject para sudden changes that cannot be foreseen. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- BuyLimitOrder: Abrir um buy limit order. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- CancelAllOrders: Cancelar all abrir orders. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- CancelAllOrdersForCurrencyPair: Cancelar all abrir orders para um currency pair. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- CancelOrder: Cancelar uma ordem. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- GetTradingPairs: Retorna all trading pairs that pode ser traded em selected account.
- GetAllOpenOrders: Return user's abrir orders. Esta API call is cached para 10 seconds. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- GetOpenOrders: Return user's abrir orders para currency pair. Esta API call is cached para 10 seconds. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- GetOrderStatus: Retorna order status. This call será executed no account (Sub ou Main), para which o used chave de API is bound to. Order pode ser fetched por using either id ou client_order_id parameter. For closed orders, this call somente retorna information para o last 30 days. 'Order not found' error será returned para orders fora this time range.
- SellInstantOrder: Abrir um instant sell order. By placing um instant order you acknowledge that o execution de your order depends no market conditions e that these conditions may be subject para sudden changes that cannot be foreseen. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- SellMarketOrder: Abrir um sell market order. By placing um market order you acknowledge that o execution de your order depends no market conditions e that these conditions may be subject para sudden changes that cannot be foreseen. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- SellLimitOrder: Abrir um sell limit order. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
Withdrawals
- RippleIOUWithdrawal: This call será executed no account (Sub ou Main), para which o used chave de API is bound to. This endpoint suporta withdrawals de USD, BTC ou EUR IOU no XRP Ledger.
- WithdrawalRequests: Return user's withdrawal requests. This call será executed no account (Sub ou Main), para which o used chave de API is bound to.
- CancelBankOrCryptoWithdrawal: Cancels um bank ou crypto withdrawal request. This call can somente be performed por your Main Account.
- OpenBankWithdrawal: Opens um bank withdrawal request (SEPA ou international). Withdrawal requests opened via API are automaticamente confirmed (no confirmation e-mail será sent), but are processed assim como withdrawals opened through o platform's interface. This call can somente be performed por your Main Account.
- FiatWithdrawalStatus: Checks o status de um fiat withdrawal request. This call can somente be performed por your Main Account.
- CryptoWithdrawal: Request um crypto withdrawal.
WebSocket Private Inscrições
SubscribeMyOrders: get updates sobre o orders sent. JSON data:
| Property | Description |
| id | Order ID. |
| id_str | Order ID represented em string format. |
| client_order_id | Client order ID (if used when placing order). |
| amount | Order amount. |
| amount_str | Order amount represented em string format. |
| price | Order price. |
| price_str | Order price represented em string format. |
| order_type | Order type (0 - buy, 1 - sell). |
| datetime | Order datetime. |
| microtimestamp | Order action timestamp represented em microseconds. |
SubscribeMyTrades: get updates sobre o trades. JSON data:
| Property | Description |
| id | Trade ID. |
| order_id | Order ID associated com o trade. |
| client_order_id | Client order ID associated com o trade. |
| amount | Trade amount. |
| price | Trade price. |
| fee | Trade fee. |
| side | Trade side (buy ou sell). |
| microtimestamp | Trade timestamp represented em microseconds. |
Bitstamp Demo
Veja abaixo um Bitstamp Demo para windows compiled com um biblioteca sgcWebSockets para Delphi.
