Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/tiagosiebler/bitget-api/llms.txt

Use this file to discover all available pages before exploring further.

The RestClientV2 class bundles several non-trading capabilities alongside its core market methods. This page covers the earn suite (flexible savings, Sharkfin structured products, and crypto loans), copy trading APIs for both spot and futures, and the sub-account management endpoints for creating, configuring, and querying child accounts. All endpoints in this section require authentication.

Savings

Flexible savings products allow you to earn yield on idle spot balances. Subscriptions and redemptions are near-instant for flexible-term products.
MethodDescription
getEarnSavingsProducts(params?)Lists available savings products; optionally filter by coin
getEarnSavingsAccount()Returns the savings account overview and total accrued interest
getEarnSavingsAssets(params)Lists savings holdings filtered by periodType
getEarnSavingsRecords(params)Paginated history of subscribe/redeem events
getEarnSavingsSubscription(params)Details of a specific savings subscription by orderId
earnSubscribeSavings(params)Subscribes to a savings product
earnRedeemSavings(params)Redeems a savings position

RedeemSavingsRequestV2 parameters

productId
string
required
The savings product identifier.
periodType
string
required
Period type matching the subscription, e.g. 'flexible'.
amount
string
required
Amount to redeem expressed as a string.
orderId
string
Optional subscription order ID for fixed-term redemptions.

Sharkfin

Sharkfin is a principal-protected structured product that provides variable yield based on whether a price range condition is met at expiry.
MethodDescription
getSharkfinProducts(params)Lists active Sharkfin products; filter by status
subscribeSharkfin(params)Subscribes to a Sharkfin product by productId and amount
getSharkfinAssets(params)Lists Sharkfin holdings filtered by status
getSharkfinRecords(params)Paginated history of Sharkfin transactions
getSharkfinSubscription(params)Details of a specific Sharkfin subscription

Crypto Loans

The loans endpoints let you borrow crypto against pledged collateral with fixed or floating daily interest rates.
MethodDescription
getLoanCurrencies(params?)Lists loanable and pledgeable currencies
getLoanDebts()Returns all active loan positions
getLoanEstInterestAndBorrowable(params)Estimates interest and maximum borrowable given pledge details
getLoanHistory(params?)Paginated loan history
getLoanLiquidationRecords(params?)Paginated loan liquidation records

GetLoanEstInterestAndBorrowableRequestV2 parameters

loanCoin
string
required
The currency you want to borrow, e.g. "USDT".
pledgeCoin
string
required
The currency used as collateral, e.g. "BTC".
daily
'SEVEN' | 'THIRTY'
required
Interest period: 7-day or 30-day rolling rate.
pledgeAmount
string
Amount of pledgeCoin to deposit as collateral. Used to estimate max borrowable.

Copy Trading — Spot

These endpoints are for traders operating as copy-trading signal providers on the spot market.
MethodDescription
getSpotTraderCurrentOrders(params?)Lists the trader’s currently active copy-trade orders
getSpotTraderHistoryOrders(params)Paginated history of the trader’s copy-trade orders
getSpotTraderFollowers(params?)Lists accounts currently following this trader
getSpotFollowerCurrentTraderSymbols(params)Lists symbols being traded by a trader that the follower is copying

Copy Trading — Futures

These endpoints are for traders providing futures copy-trading signals.
MethodDescription
getFuturesTraderCurrentOrder(params)Returns the trader’s current open futures copy-trade order
getFuturesTraderHistoryOrders(params)Paginated futures copy-trade order history
getFuturesTraderFollowers(params)Lists accounts following this futures trader

Sub-Accounts

Sub-accounts allow institutions and power users to segregate funds and API access across multiple child accounts under a single master account.
MethodDescription
createSubaccount(params)Creates a new sub-account with a given username
getSubaccounts(params?)Lists all sub-accounts under the master account
modifySubaccount(params)Updates sub-account settings (e.g. permissions, status)
createSubaccountApiKey(params)Creates an API key scoped to a specific sub-account
getSubaccountApiKey(params)Retrieves API key details for a sub-account
modifySubaccountApiKey(params)Updates permissions or IP restrictions on a sub-account API key
getSubaccountSpotAssets(params)Returns spot asset balances for a sub-account
getSubaccountFuturesAssets(params)Returns futures asset balances for a sub-account

Code examples

import { RestClientV2 } from 'bitget-api';

const client = new RestClientV2({
  apiKey: process.env.API_KEY,
  apiSecret: process.env.API_SECRET,
  apiPass: process.env.API_PASS,
});

// List available savings products
const products = await client.getEarnSavingsProducts();
console.log('Savings products:', products.data);

// Subscribe to a flexible savings product
const subscribeResult = await client.earnSubscribeSavings({
  productId: products.data[0].productId,
  periodType: 'flexible',
  amount: '100',
});
console.log('Subscribe result:', subscribeResult.data);
Sharkfin products have fixed subscription windows. Call getSharkfinProducts with { status: 'in_progress' } to list currently open subscription periods.

Build docs developers (and LLMs) love