API Bitstamp
Bitstamp
Bitstamp is a bitcoin exchange based in Luxembourg. It allows trading between USD currency and bitcoin cryptocurrency. It allows USD, EUR, bitcoin, litecoin, ethereum, ripple or bitcoin cash deposits and withdrawals.
- Supports the latest WebSocket API V2.
- Supports the following REST API Endpoints: Account Balance, Orders and Withdrawal.
Configuration
Private API requires to get create an API from your Bitstamp account. Once you've your API keys, configure these keys in the following properties:
- Bitstamp.ApiKey
- Bitstamp.ApiSecret
WebSocket Public Methods
SubscribeLiveTicker: get live trades from currency selected. JSON data:
Property |
Description |
id |
Trade unique ID. |
amount |
Trade amount. |
amount_str |
Trade amount represented in string format. |
price |
Trade price. |
price_str |
Trade price represented in string format. |
type |
Trade type (0 - buy; 1 - sell). |
timestamp |
Trade timestamp. |
microtimestamp |
Trade microtimestamp. |
buy_order_id |
Trade buy order ID. |
sell_order_id |
Trade sell order ID. |
SubscribeLiveOrders: get live orders from currency selected. JSON data:
Property |
Description |
id |
Order ID. |
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. |
SubscribeLiveOrderBook: get live order book from currency selected. JSON data:
Property |
Description |
bids |
List of top 100 bids. |
asks |
List of top 100 asks. |
timestamp |
Order book timestamp. |
microtimestamp |
Order book microtimestamp. |
SubscribeLiveDetailOrderBook: get live detail order book from currency selected. JSON data:
Property |
Description |
bids |
List of top 100 bids [price, amount, order id]. |
asks |
List of top 100 asks [price, amount, order id]. |
timestamp |
Order book timestamp. |
microtimestamp |
Order book microtimestamp. |
SubscribeLiveFullOrderBook: get live full order book from currency selected. JSON data:
Property |
Description |
bids |
List of changed bids since last broadcast. |
asks |
List of changed asks since last broadcast. |
timestamp |
Order book timestamp. |
microtimestamp |
Order book microtimestamp. |
WebSocket Private Methods
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. |
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.