By Admin on Friday, 27 February 2026
Category: All

Bitstamp API Update for sgcWebSockets

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 New

The following new REST API endpoint categories have been added to the TsgcHTTP_API_Bitstamp_Rest component:

Table of Contents

  1. User Transactions
  2. Fees
  3. Deposit Addresses
  4. Sub-Account Transfers
  5. Earn / Staking
  6. Travel Rule and Markets
  7. WebSocket API
  8. Configuration

1. User Transactions

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.

Example

// 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');

2. Fees

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.

Example

// 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;

3. Deposit Addresses

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.

Example

// Get Bitcoin deposit address
vJSON := Bitstamp1.REST_API.GetCryptoDepositAddress('btc');

// Get Ethereum deposit address
vJSON := Bitstamp1.REST_API.GetCryptoDepositAddress('eth');

4. Sub-Account Transfers

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.

Example

// 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');

5. Earn / Staking

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.

Example

// 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');

6. Travel Rule and Markets

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.

Example

// Get list of Travel Rule VASPs
vJSON := Bitstamp1.REST_API.GetTravelRuleVASPs;

// Get all available markets
vJSON := Bitstamp1.REST_API.GetMarkets;

7. WebSocket API

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.


8. Configuration

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';
Note: All new endpoints use the same HMAC-SHA256 header-based authentication (X-Auth headers) that is already in place for existing private endpoints. No additional configuration is needed.

Related Posts