The Bitstamp API Client has been updated to include new features and API endpoints. Find below a list of the main features implemented:
- REST Public API: Tickers, Order Book, Transactions and Market Info
- REST Private API: Account balance, orders and withdrawals.
- WebSocket Private Subscriptions: Orders and Trades.
REST API
REST API Public Methods
Tickers
- GetCurrencies: View that returns list of all currencies with basic data.
- GetAllCurrencyPairsTickers: Return ticker data for all currency pairs. Passing any GET parameters, will result in your request being rejected.
- GetCurrencyPairTicker: Return ticker data for the requested currency pair. Passing any GET parameters, will result in your request being rejected.
- GetHourlyTicker: Return hourly ticker data for the requested currency pair. Passing any GET parameters, will result in your request being rejected.
Order Book
- GetOrderBook: Returns order book data.
Transactions
- GetTransactions: Return transaction data from a given time frame.
Market Info
- GetEURUSDConversionRate: Return EUR/USD conversion rate.
- GetOLHCData: View that returns OHLC (Open High Low Close) data on api request.
- GetTradingPairsInfo: Return trading pairs info.
REST API Private Methods
Account Balance
- GetAccountBalances: Return account balances.
- GetAccountBalanceForCurrency: Return account balances for currency.
Orders
- BuyInstantOrder: Open a buy instant order. By placing an instant order you acknowledge that the execution of your order depends on the market conditions and that these conditions may be subject to sudden changes that cannot be foreseen. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- BuyMarketOrder: Open a buy market order. By placing a market order you acknowledge that the execution of your order depends on the market conditions and that these conditions may be subject to sudden changes that cannot be foreseen. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- BuyLimitOrder: Open a buy limit order. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- CancelAllOrders: Cancel all open orders. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- CancelAllOrdersForCurrencyPair: Cancel all open orders for a currency pair. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- CancelOrder: Cancel an order. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- GetTradingPairs: Returns all trading pairs that can be traded on selected account.
- GetAllOpenOrders: Return user's open orders. This API call is cached for 10 seconds. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- GetOpenOrders: Return user's open orders for currency pair. This API call is cached for 10 seconds. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- GetOrderStatus: Returns order status. This call will be executed on the account (Sub or Main), to which the used API key is bound to. Order can be fetched by using either id or client_order_id parameter. For closed orders, this call only returns information for the last 30 days. 'Order not found' error will be returned for orders outside this time range.
- SellInstantOrder: Open an instant sell order. By placing an instant order you acknowledge that the execution of your order depends on the market conditions and that these conditions may be subject to sudden changes that cannot be foreseen. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- SellMarketOrder: Open a sell market order. By placing a market order you acknowledge that the execution of your order depends on the market conditions and that these conditions may be subject to sudden changes that cannot be foreseen. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- SellLimitOrder: Open a sell limit order. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
Withdrawals
- RippleIOUWithdrawal: This call will be executed on the account (Sub or Main), to which the used API key is bound to. This endpoint supports withdrawals of USD, BTC or EUR IOU on the XRP Ledger.
- WithdrawalRequests: Return user's withdrawal requests. This call will be executed on the account (Sub or Main), to which the used API key is bound to.
- CancelBankOrCryptoWithdrawal: Cancels a bank or crypto withdrawal request. This call can only be performed by your Main Account.
- OpenBankWithdrawal: Opens a bank withdrawal request (SEPA or international). Withdrawal requests opened via API are automatically confirmed (no confirmation e-mail will be sent), but are processed just like withdrawals opened through the platform's interface. This call can only be performed by your Main Account.
- FiatWithdrawalStatus: Checks the status of a fiat withdrawal request. This call can only be performed by your Main Account.
- CryptoWithdrawal: Request a crypto withdrawal.
WebSocket Private Subscriptions
SubscribeMyOrders: get updates about the orders sent. JSON data:
Property | Description |
id | Order ID. |
id_str | Order ID represented in string format. |
client_order_id | Client order ID (if used when placing order). |
amount | Order amount. |
amount_str | Order amount represented in string format. |
price | Order price. |
price_str | Order price represented in string format. |
order_type | Order type (0 - buy, 1 - sell). |
datetime | Order datetime. |
microtimestamp | Order action timestamp represented in microseconds. |
SubscribeMyTrades: get updates about the trades. JSON data:
Property | Description |
id | Trade ID. |
order_id | Order ID associated with the trade. |
client_order_id | Client order ID associated with the trade. |
amount | Trade amount. |
price | Trade price. |
fee | Trade fee. |
side | Trade side (buy or sell). |
microtimestamp | Trade timestamp represented in microseconds. |
Bitstamp Demo
Find below a Bitstamp Demo for windows compiled with the sgcWebSockets library for Delphi.