KucoinAccount: Account and Funding Management
KucoinAccount: Account and Funding Management
Details
Provides methods for querying account information, balances, and ledger history on KuCoin. Inherits from KucoinBase.
Purpose and Scope
Account Summary: Retrieve VIP level, sub-account count, and general account metadata.
API Key Inspection: Query permissions, IP whitelist, and expiry for the active API key.
Spot Accounts: List all spot/margin/trade accounts with balances, or inspect a single account by ID.
Margin Accounts: Retrieve cross-margin and isolated-margin account details including liability and asset info.
Ledger History: Paginated transaction history across spot and margin accounts with datetime conversion.
Usage
All methods require authentication (valid API key, secret, passphrase set via environment variables or passed to the constructor). The class supports both synchronous and asynchronous (coro/promises) operation modes inherited from KucoinBase.
# Synchronous usage
account <- KucoinAccount$new()
summary <- account$get_summary()
print(summary)
# Asynchronous usage
account_async <- KucoinAccount$new(async = TRUE)
main <- coro::async(function() {
summary <- await(account_async$get_summary())
print(summary)
})
main()
while (!later::loop_empty()) later::run_now()Endpoints Covered
| Method | Endpoint | HTTP |
| get_summary | GET /api/v2/user-info | GET |
| get_apikey_info | GET /api/v1/user/api-key | GET |
| get_spot_account_type | GET /api/v1/hf/accounts/opened | GET |
| get_spot_accounts | GET /api/v1/accounts | GET |
| get_spot_account_detail | GET /api/v1/accounts/{accountId} | GET |
| get_cross_margin_account | GET /api/v3/margin/accounts | GET |
| get_isolated_margin_account | GET /api/v3/isolated/accounts | GET |
| get_spot_ledger | GET /api/v1/accounts/ledgers | GET |
| get_hf_ledger | GET /api/v1/hf/accounts/ledgers | GET |
| get_base_fee_rate | GET /api/v1/base-fee | GET |
| get_fee_rate | GET /api/v1/trade-fees | GET |
Super class
kucoin::KucoinBase -> KucoinAccount
Methods
Inherited methods
Method get_summary()
Get Account Summary
Retrieves account summary information including VIP level, sub-account count, and general account metadata for the authenticated user.
Workflow
Request: Authenticated GET to the user-info endpoint.
Parsing: Converts the response into a single-row
data.table.
Automated Trading Usage
VIP Tier Monitoring: Check
levelto confirm fee tier before placing large orders.Sub-Account Awareness: Use
sub_quantityto verify sub-account count for multi-strategy bots.Rate Limit Planning: Higher VIP levels receive more generous rate limits; adjust request frequency accordingly.
JSON Response
{
"code": "200000",
"data": {
"level": 1,
"subQuantity": 3,
"maxDefaultSubQuantity": 5,
"maxSubQuantity": 5,
"spotSubQuantity": 2,
"marginSubQuantity": 1,
"futuresSubQuantity": 0,
"optionSubQuantity": 0,
"maxSpotSubQuantity": 5,
"maxMarginSubQuantity": 5,
"maxFuturesSubQuantity": 5,
"maxOptionSubQuantity": 5
}
}Returns
data.table (or promise<data.table> if constructed with async = TRUE) with columns:
level (integer, VIP tier),
sub_quantity (integer, total sub-accounts), max_default_sub_quantity (integer),
max_sub_quantity (integer), spot_sub_quantity (integer), margin_sub_quantity (integer),
futures_sub_quantity (integer), option_sub_quantity (integer),
max_spot_sub_quantity (integer), max_margin_sub_quantity (integer),
max_futures_sub_quantity (integer), max_option_sub_quantity (integer).
Method get_apikey_info()
Get API Key Info
Retrieves detailed information about the currently authenticated API key, including its permissions, IP whitelist, creation date, and associated UID.
Workflow
Request: Authenticated GET to the api-key endpoint.
Parsing: Converts the response into a single-row
data.table.
Automated Trading Usage
Permission Verification: Confirm the key has
Tradepermission before placing orders in a bot startup routine.IP Whitelist Check: Validate that the bot's server IP is in
is_master/ip_whitelistto avoid auth failures.Key Rotation Monitoring: Use
created_atto track key age and schedule rotation for security.
Returns
data.table (or promise<data.table> if constructed with async = TRUE) with columns:
remark (character, key label),
api_key (character, API key ID), api_version (integer, key version),
permission (character, comma-separated permissions e.g. "General,Spot"),
ip_whitelist (character, allowed IPs), created_at (numeric, epoch ms),
uid (numeric, user ID), is_master (logical, TRUE if master account key).
Method get_spot_account_type()
Get Spot Account Types
Retrieves the account types that have been opened for HF (High-Frequency) spot trading. This indicates which account categories are active.
Workflow
Request: Authenticated GET to the HF accounts opened endpoint.
Parsing: If a named list is returned, converts to a single-row
data.table. If a list of entries is returned, row-binds into a multi-rowdata.table. Returns an emptydata.tableif no accounts are opened.
Automated Trading Usage
Pre-Trade Validation: Confirm HF trading accounts are opened before submitting HF orders.
Account Provisioning: Detect missing account types at bot startup and alert the operator.
Multi-Account Bots: Verify that both
tradeandmargintypes are available for strategies that span both.
Method get_spot_accounts()
Get Spot Account List
Retrieves all spot accounts for the authenticated user, optionally filtered by currency or account type. Each row represents a single account with its current balance, available funds, and holds.
Workflow
Request: Authenticated GET with optional query filters.
Parsing: Row-binds the list of account objects into a
data.table. Returns an emptydata.tableif no accounts match the filter.
Automated Trading Usage
Balance Checks: Query available funds before placing orders to avoid insufficient balance errors.
Portfolio Snapshot: Retrieve all account balances periodically for portfolio tracking and rebalancing.
Filter by Type: Use
query = list(type = "trade")to get only trading account balances for order sizing.
curl
curl --location --request GET 'https://api.kucoin.com/api/v1/accounts?currency=USDT&type=trade' \
--header 'KC-API-KEY: your-api-key' \
--header 'KC-API-SIGN: your-signature' \
--header 'KC-API-TIMESTAMP: 1729176273859' \
--header 'KC-API-PASSPHRASE: your-passphrase' \
--header 'KC-API-KEY-VERSION: 2'JSON Response
{
"code": "200000",
"data": [
{
"id": "5bd6e9286d99522a52e458de",
"currency": "USDT",
"type": "trade",
"balance": "1250.75",
"available": "1200.50",
"holds": "50.25"
},
{
"id": "5bd6e9286d99522a52e458df",
"currency": "BTC",
"type": "trade",
"balance": "0.05123",
"available": "0.05123",
"holds": "0"
}
]
}Usage
KucoinAccount$get_spot_accounts(query = list())Arguments
queryNamed list; optional filter parameters. Supported keys:
currency(character): Filter by currency code e.g."USDT","BTC".type(character): Filter by account type:"main","trade", or"margin".
Returns
data.table (or promise<data.table> if constructed with async = TRUE) with columns:
id (character, account ID),
currency (character, currency code), type (character, account type),
balance (character, total balance), available (character, available for trading),
holds (character, amount on hold in open orders). Returns an empty
data.table if no accounts match.
Method get_spot_account_detail()
Get Spot Account Detail
Retrieves detailed information for a single specific account identified by its account ID. Returns currency, type, balance, available, and holds.
Workflow
Request: Authenticated GET with the account ID appended to the path.
Parsing: Converts the response into a single-row
data.table.
Automated Trading Usage
Precise Balance Check: Query a specific account by ID when you already know the account to avoid parsing lists.
Post-Trade Verification: After an order fills, query the relevant account to confirm balance changes.
Hold Monitoring: Check
holdsto understand how much capital is locked in open orders.
curl
curl --location --request GET 'https://api.kucoin.com/api/v1/accounts/5bd6e9286d99522a52e458de' \
--header 'KC-API-KEY: your-api-key' \
--header 'KC-API-SIGN: your-signature' \
--header 'KC-API-TIMESTAMP: 1729176273859' \
--header 'KC-API-PASSPHRASE: your-passphrase' \
--header 'KC-API-KEY-VERSION: 2'Arguments
accountIdCharacter; the unique account ID (e.g.
"5bd6e9286d99522a52e458de"). Obtain account IDs fromget_spot_accounts().
Returns
data.table (or promise<data.table> if constructed with async = TRUE) with columns:
currency (character, currency code),
balance (character, total balance), available (character, available for use),
holds (character, amount held in open orders).
Examples
\dontrun{
account <- KucoinAccount$new()
# First get all accounts to find the ID
accounts <- account$get_spot_accounts(query = list(currency = "USDT", type = "trade"))
account_id <- accounts$id[1]
# Then query the specific account
detail <- account$get_spot_account_detail(account_id)
cat("Balance:", detail$balance, "Available:", detail$available, "\\n")
}
Method get_cross_margin_account()
Get Cross Margin Account
Retrieves cross margin account information including balances, liabilities, and asset details for all currencies held in the cross margin account.
Workflow
Request: Authenticated GET with optional query filters.
Parsing: Extracts the
accountssub-list from the response and row-binds into adata.table. Returns emptydata.tableif no accounts found.
Automated Trading Usage
Margin Risk Monitoring: Check
liabilityandtotalAssetto compute margin ratio and trigger de-risk actions.Borrowing Capacity: Use
available_balanceto determine how much additional margin is available before placing leveraged orders.Cross-Margin Rebalancing: Periodically query to detect imbalanced positions and repay liabilities automatically.
curl
curl --location --request GET 'https://api.kucoin.com/api/v3/margin/accounts?quoteCurrency=USDT&queryType=MARGIN' \
--header 'KC-API-KEY: your-api-key' \
--header 'KC-API-SIGN: your-signature' \
--header 'KC-API-TIMESTAMP: 1729176273859' \
--header 'KC-API-PASSPHRASE: your-passphrase' \
--header 'KC-API-KEY-VERSION: 2'JSON Response
{
"code": "200000",
"data": {
"totalAssetOfQuoteCurrency": "15234.67",
"totalLiabilityOfQuoteCurrency": "2500.00",
"debtRatio": "0.1641",
"status": "EFFECTIVE",
"accounts": [
{
"currency": "USDT",
"totalBalance": "10000.00",
"availableBalance": "8500.00",
"holdBalance": "1500.00",
"liability": "2500.00",
"maxBorrowSize": "50000.00",
"borrowEnabled": true,
"transferInEnabled": true
},
{
"currency": "BTC",
"totalBalance": "0.15",
"availableBalance": "0.15",
"holdBalance": "0",
"liability": "0",
"maxBorrowSize": "2.5",
"borrowEnabled": true,
"transferInEnabled": true
}
]
}
}Usage
KucoinAccount$get_cross_margin_account(query = list())Arguments
queryNamed list; optional filter parameters. Supported keys:
quoteCurrency(character): Quote currency for valuation e.g."USDT","BTC".queryType(character): Query type e.g."MARGIN","MARGIN_V2".
Returns
data.table (or promise<data.table> if constructed with async = TRUE) with columns:
currency (character),
total_balance (character), available_balance (character), hold_balance (character),
liability (character), max_borrow_size (character), borrow_enabled (logical),
transfer_in_enabled (logical). Returns an empty data.table if no margin accounts exist.
Method get_isolated_margin_account()
Get Isolated Margin Account
Retrieves isolated margin account information for specific trading pairs. Each isolated margin account is tied to a single symbol and has independent balances, liabilities, and risk parameters.
Workflow
Request: Authenticated GET with optional query filters.
Parsing: Extracts the
assetssub-list from the response and row-binds into adata.table. Returns emptydata.tableif no assets found.
Automated Trading Usage
Per-Pair Risk Management: Monitor isolated margin ratios per symbol to trigger stop-loss or de-leverage actions independently.
Position Sizing: Use
available_balancefor the specific trading pair to size new margin orders correctly.Liquidation Prevention: Compare
debt_ratioagainst liquidation thresholds and add margin or reduce positions automatically.
curl
curl --location --request GET 'https://api.kucoin.com/api/v3/isolated/accounts?symbol=BTC-USDT"eCurrency=USDT&queryType=ISOLATED' \
--header 'KC-API-KEY: your-api-key' \
--header 'KC-API-SIGN: your-signature' \
--header 'KC-API-TIMESTAMP: 1729176273859' \
--header 'KC-API-PASSPHRASE: your-passphrase' \
--header 'KC-API-KEY-VERSION: 2'JSON Response
{
"code": "200000",
"data": {
"totalAssetOfQuoteCurrency": "5234.67",
"totalLiabilityOfQuoteCurrency": "1000.00",
"timestamp": 1729176273859,
"assets": [
{
"symbol": "BTC-USDT",
"status": "EFFECTIVE",
"debtRatio": "0.1912",
"baseAsset": {
"currency": "BTC",
"totalBalance": "0.1",
"holdBalance": "0",
"availableBalance": "0.1",
"liability": "0",
"interest": "0",
"borrowableAmount": "1.5"
},
"quoteAsset": {
"currency": "USDT",
"totalBalance": "5000.00",
"holdBalance": "500.00",
"availableBalance": "4500.00",
"liability": "1000.00",
"interest": "0.42",
"borrowableAmount": "25000.00"
}
}
]
}
}Usage
KucoinAccount$get_isolated_margin_account(query = list())Arguments
queryNamed list; optional filter parameters. Supported keys:
symbol(character): Trading pair e.g."BTC-USDT". Filter to a specific pair.quoteCurrency(character): Quote currency for valuation e.g."USDT".queryType(character): Query type e.g."ISOLATED","ISOLATED_V2".
Returns
data.table (or promise<data.table> if constructed with async = TRUE) with columns:
Columns are flattened from the nested response and may include:
symbol (character), status (character), debt_ratio (character),
and nested base_asset.* and quote_asset.* fields (currency, total_balance, hold_balance,
available_balance, liability, interest, borrowable_amount). Returns an empty data.table
if no isolated margin accounts exist.
Method get_spot_ledger()
Get Spot Account Ledger
Retrieves paginated account ledger (transaction history) for spot and margin
accounts. Each entry represents a balance change event such as a trade fill,
deposit, withdrawal, transfer, or fee charge. Automatically converts the
created_at millisecond timestamp to a datetime_created POSIXct column.
Workflow
Pagination: Calls the internal
$.paginate()method which fetches successive pages until all results are retrieved ormax_pagesis reached.Flattening: Combines all pages into a single
data.tableviaflatten_pages().Datetime Conversion: If
created_atis present, adds adatetime_createdcolumn by converting epoch milliseconds to POSIXct.
Automated Trading Usage
Trade Reconciliation: Compare ledger entries against expected fills to verify order execution integrity.
Fee Tracking: Filter by
bizType = "Exchange"to aggregate trading fees for cost analysis.Audit Trail: Fetch full ledger history with
max_pages = Inffor end-of-day accounting and compliance.
curl
curl --location --request GET 'https://api.kucoin.com/api/v1/accounts/ledgers?currency=USDT&direction=in&bizType=Exchange&pageSize=50¤tPage=1' \
--header 'KC-API-KEY: your-api-key' \
--header 'KC-API-SIGN: your-signature' \
--header 'KC-API-TIMESTAMP: 1729176273859' \
--header 'KC-API-PASSPHRASE: your-passphrase' \
--header 'KC-API-KEY-VERSION: 2'JSON Response
{
"code": "200000",
"data": {
"currentPage": 1,
"pageSize": 50,
"totalNum": 2,
"totalPage": 1,
"items": [
{
"id": "611a1e7c6a053300067a88de",
"currency": "USDT",
"amount": "125.50",
"fee": "0.1255",
"balance": "3750.25",
"accountType": "TRADE",
"bizType": "Exchange",
"direction": "in",
"createdAt": 1729176273859,
"context": "{\"orderId\":\"670fd33bf9406e0007ab3945\",\"symbol\":\"BTC-USDT\"}"
},
{
"id": "611a1e7c6a053300067a88df",
"currency": "USDT",
"amount": "50.00",
"fee": "0",
"balance": "3624.75",
"accountType": "TRADE",
"bizType": "Transfer",
"direction": "out",
"createdAt": 1729170000000,
"context": "{\"description\":\"Transfer to main account\"}"
}
]
}
}Usage
KucoinAccount$get_spot_ledger(query = list(), page_size = 50, max_pages = Inf)Arguments
queryNamed list; optional filter parameters. Supported keys:
currency(character): Filter by currency code e.g."USDT","BTC".direction(character): Filter by direction:"in"or"out".bizType(character): Business type filter e.g."Exchange","Deposit","Withdrawal","Transfer","Trade_Exchange".startAt(numeric): Start time in milliseconds (epoch). Inclusive.endAt(numeric): End time in milliseconds (epoch). Inclusive.
page_sizeInteger; number of results per page, between 10 and 500. Default
50.max_pagesNumeric; maximum number of pages to fetch. Default
Inf(fetch all pages). Set to a finite number to limit API calls.
Returns
data.table (or promise<data.table> if constructed with async = TRUE) with columns:
id (character, ledger entry ID),
currency (character), amount (character, transaction amount),
fee (character, fee charged), balance (character, balance after transaction),
account_type (character, e.g. "TRADE", "MAIN"),
biz_type (character, business type), direction (character, "in" or "out"),
context (character, JSON metadata),
datetime_created (POSIXct, converted from created_at).
Returns an empty data.table if no ledger entries match.
Examples
\dontrun{
account <- KucoinAccount$new()
# Get recent USDT trade ledger entries
ledger <- account$get_spot_ledger(
query = list(currency = "USDT", bizType = "Exchange"),
page_size = 100,
max_pages = 5
)
print(ledger)
# Get all ledger entries for the last 24 hours
now_ms <- as.numeric(lubridate::now()) * 1000
ledger_24h <- account$get_spot_ledger(
query = list(startAt = now_ms - 86400000, endAt = now_ms)
)
print(ledger_24h[, .(currency, amount, direction, datetime_created)])
}
Method get_hf_ledger()
Get HF Trading Account Ledger
Retrieves transfer records from high-frequency trading accounts. Results are sorted by creation timestamp in descending order. Data is limited to a rolling 7-day window.
Automated Trading Usage
PnL Tracking: Filter by
bizType = "TRADE_EXCHANGE"to track trading gains/losses.Fee Reconciliation: Use
feeandtaxfields for accurate fee accounting.Audit Trail: Build trade-by-trade logs from the
contextJSON field.
Usage
KucoinAccount$get_hf_ledger(
currency = NULL,
direction = NULL,
bizType = NULL,
lastId = NULL,
limit = NULL,
startAt = NULL,
endAt = NULL
)Arguments
currencyCharacter or NULL; filter by currency (supports up to 10 comma-separated).
directionCharacter or NULL;
"in"or"out".bizTypeCharacter or NULL; transaction type:
"TRADE_EXCHANGE","TRANSFER","SUB_TRANSFER","RETURNED_FEES","DEDUCTION_FEES","OTHER".lastIdCharacter or NULL; pagination cursor for fetching previous batches.
limitInteger or NULL; results per page (default 100, max 200).
startAtInteger or NULL; start timestamp in milliseconds.
endAtInteger or NULL; end timestamp in milliseconds.
Returns
data.table (or promise<data.table> if constructed with async = TRUE) with columns:
id (character), currency (character), amount (character),
fee (character), tax (character), balance (character),
account_type (character), biz_type (character),
direction (character), context (character),
datetime_created (POSIXct).
Method get_base_fee_rate()
Get Base Fee Rate
Retrieves the base (tier default) taker and maker fee rates for spot/margin trading. This is the account's default rate before any per-symbol discounts.
Automated Trading Usage
Tier Awareness: Know your default fee tier for cost estimation.
Fee Budgeting: Use as baseline for worst-case fee calculations.
Method get_fee_rate()
Get Actual Fee Rate
Retrieves the actual (per-symbol) taker and maker fee rates after VIP/KCS discounts. Supports up to 10 trading pairs per request.
Automated Trading Usage
Precise PnL: Use actual rates for accurate profit/loss calculations.
Fee Optimization: Compare rates across pairs to choose the cheapest execution venue.
Batch Query: Query up to 10 pairs at once to minimize API calls.
Examples
if (FALSE) { # \dontrun{
# Synchronous
account <- KucoinAccount$new()
summary <- account$get_summary()
print(summary)
# Asynchronous
account_async <- KucoinAccount$new(async = TRUE)
main <- coro::async(function() {
summary <- await(account_async$get_summary())
print(summary)
})
main()
while (!later::loop_empty()) later::run_now()
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_summary`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
summary <- account$get_summary()
cat("VIP Level:", summary$level, "\\n")
cat("Sub-accounts:", summary$sub_quantity, "/", summary$max_sub_quantity, "\\n")
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_apikey_info`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
key_info <- account$get_apikey_info()
cat("Permissions:", key_info$permission, "\\n")
cat("IP Whitelist:", key_info$ip_whitelist, "\\n")
cat("Is Master:", key_info$is_master, "\\n")
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_spot_account_type`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
types <- account$get_spot_account_type()
print(types)
# Check if trade account is opened
if (nrow(types) > 0 && any(types$is_opened)) {
cat("HF trading account is active.\n")
}
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_spot_accounts`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
# Get all accounts
all_accounts <- account$get_spot_accounts()
print(all_accounts)
# Get only USDT trade accounts
usdt <- account$get_spot_accounts(query = list(currency = "USDT", type = "trade"))
cat("USDT available:", usdt$available, "\\n")
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_spot_account_detail`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
# First get all accounts to find the ID
accounts <- account$get_spot_accounts(query = list(currency = "USDT", type = "trade"))
account_id <- accounts$id[1]
# Then query the specific account
detail <- account$get_spot_account_detail(account_id)
cat("Balance:", detail$balance, "Available:", detail$available, "\\n")
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_cross_margin_account`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
margin <- account$get_cross_margin_account(query = list(quoteCurrency = "USDT"))
print(margin)
# Check debt ratio
cat("Liabilities:", margin[currency == "USDT", liability], "\\n")
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_isolated_margin_account`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
isolated <- account$get_isolated_margin_account(
query = list(symbol = "BTC-USDT", quoteCurrency = "USDT")
)
print(isolated)
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_spot_ledger`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
# Get recent USDT trade ledger entries
ledger <- account$get_spot_ledger(
query = list(currency = "USDT", bizType = "Exchange"),
page_size = 100,
max_pages = 5
)
print(ledger)
# Get all ledger entries for the last 24 hours
now_ms <- as.numeric(lubridate::now()) * 1000
ledger_24h <- account$get_spot_ledger(
query = list(startAt = now_ms - 86400000, endAt = now_ms)
)
print(ledger_24h[, .(currency, amount, direction, datetime_created)])
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_hf_ledger`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
hf <- account$get_hf_ledger(currency = "USDT", bizType = "TRADE_EXCHANGE")
print(hf[, .(currency, amount, fee, direction, datetime_created)])
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_base_fee_rate`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
fees <- account$get_base_fee_rate()
cat("Taker:", fees$taker_fee_rate, "Maker:", fees$maker_fee_rate, "\n")
} # }
## ------------------------------------------------
## Method `KucoinAccount$get_fee_rate`
## ------------------------------------------------
if (FALSE) { # \dontrun{
account <- KucoinAccount$new()
fees <- account$get_fee_rate("BTC-USDT,ETH-USDT")
print(fees[, .(symbol, taker_fee_rate, maker_fee_rate)])
} # }