eSeGeCe
software
The sgcWebSockets library has been updated with significant improvements to the Bitstamp REST API component. This update adds support for several new endpoint categories that were previously missing, making the integration more comprehensive and aligned with the latest Bitstamp API v2 offerings.
What's NewThe following new REST API endpoint categories have been added to the TsgcHTTP_API_Bitstamp_Rest component:
Two new methods allow you to retrieve your transaction history:
| Method | Description |
|---|---|
GetUserTransactions |
Returns all user transactions with support for pagination (limit, offset) and sorting. |
GetUserTransactionsForCurrencyPair |
Returns user transactions filtered by a specific currency pair. |
// Get the last 50 user transactions, sorted descending
vJSON := Bitstamp1.REST_API.GetUserTransactions(50, 0, 'desc');
// Get user transactions for BTC/USD pair
vJSON := Bitstamp1.REST_API.GetUserTransactionsForCurrencyPair('btcusd');
Three new methods provide access to fee information:
| Method | Description |
|---|---|
GetTradingFees |
Returns trading fees for all currency pairs. |
GetTradingFeesForCurrencyPair |
Returns the trading fee for a specific currency pair. |
GetWithdrawalFees |
Returns withdrawal fees for all supported currencies. |
// Get all trading fees
vJSON := Bitstamp1.REST_API.GetTradingFees;
// Get trading fee for ETH/USD
vJSON := Bitstamp1.REST_API.GetTradingFeesForCurrencyPair('ethusd');
// Get withdrawal fees
vJSON := Bitstamp1.REST_API.GetWithdrawalFees;
A new method allows you to retrieve the deposit address for any supported cryptocurrency:
| Method | Description |
|---|---|
GetCryptoDepositAddress |
Returns the deposit address for the specified currency. |
// Get Bitcoin deposit address
vJSON := Bitstamp1.REST_API.GetCryptoDepositAddress('btc');
// Get Ethereum deposit address
vJSON := Bitstamp1.REST_API.GetCryptoDepositAddress('eth');
Two new methods enable fund transfers between main and sub-accounts:
| Method | Description |
|---|---|
TransferToMain |
Transfers funds from a sub-account to the main account. |
TransferFromMain |
Transfers funds from the main account to a sub-account. |
// Transfer 0.5 BTC from sub-account to main
vJSON := Bitstamp1.REST_API.TransferToMain('btc', '0.5');
// Transfer 100 USD from main to a specific sub-account
vJSON := Bitstamp1.REST_API.TransferFromMain('usd', '100', 'sub_account_id');
Four new methods provide full access to the Bitstamp Earn staking program:
| Method | Description |
|---|---|
EarnSubscribe |
Subscribe to earn rewards for the specified currency and amount. |
EarnUnsubscribe |
Unsubscribe from the earn program. |
GetEarnSubscriptions |
Returns the list of current earn subscriptions. |
GetEarnTransactions |
Returns the earn transaction history including rewards. |
// Subscribe 1 ETH to the Earn program
vJSON := Bitstamp1.REST_API.EarnSubscribe('eth', '1.0');
// Check current subscriptions
vJSON := Bitstamp1.REST_API.GetEarnSubscriptions;
// Get earn transaction history (rewards, etc.)
vJSON := Bitstamp1.REST_API.GetEarnTransactions;
// Unsubscribe 0.5 ETH from Earn
vJSON := Bitstamp1.REST_API.EarnUnsubscribe('eth', '0.5');
Two additional public endpoints have been added:
| Method | Description |
|---|---|
GetTravelRuleVASPs |
Returns the list of Virtual Asset Service Providers (VASPs) for EU Travel Rule compliance. Useful when performing crypto withdrawals that require beneficiary VASP information. |
GetMarkets |
Returns the list of all available markets with basic data, complementing the existing GetTradingPairsInfo method. |
// Get list of Travel Rule VASPs
vJSON := Bitstamp1.REST_API.GetTravelRuleVASPs;
// Get all available markets
vJSON := Bitstamp1.REST_API.GetMarkets;
The WebSocket API V2 remains fully up to date. All public channels (Live Ticker, Live Orders, Order Book, Detail Order Book, Full Order Book)
and private channels (My Orders, My Trades) continue to work with the
wss://ws.bitstamp.net endpoint.
To use the private REST API endpoints, you need to configure your Bitstamp API credentials:
Bitstamp1.Bitstamp.ApiKey := 'your_api_key';
Bitstamp1.Bitstamp.ApiSecret := 'your_api_secret';
When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.