Skip to contents

Retrieves a list of all available trading symbols from the KuCoin API asynchronously, optionally filtered by market.

Usage

get_all_symbols_impl(
  base_url = get_base_url(),
  market = NULL,
  .__coro_env_parent__ = <environment>
)

Arguments

base_url

Character string; base URL for the KuCoin API. Defaults to get_base_url().

market

Character string (optional); trading market to filter symbols (e.g., "ALTS", "USDS", "ETF").

Value

Promise resolving to a data.table containing:

  • symbol (character): Unique trading symbol code.

  • name (character): Name of the trading pair.

  • baseCurrency (character): Base currency.

  • quoteCurrency (character): Quote currency.

  • feeCurrency (character): Currency for fees.

  • market (character): Trading market.

  • baseMinSize (character): Minimum order quantity.

  • quoteMinSize (character): Minimum order funds.

  • baseMaxSize (character): Maximum order size.

  • quoteMaxSize (character): Maximum order funds.

  • baseIncrement (character): Quantity increment.

  • quoteIncrement (character): Quote increment.

  • priceIncrement (character): Price increment.

  • priceLimitRate (character): Price protection threshold.

  • minFunds (character): Minimum trading amount.

  • isMarginEnabled (logical): Margin trading status.

  • enableTrading (logical): Trading enabled status.

  • feeCategory (integer): Fee category.

  • makerFeeCoefficient (character): Maker fee coefficient.

  • takerFeeCoefficient (character): Taker fee coefficient.

  • st (logical): Special treatment flag.

  • callauctionIsEnabled (logical): Call auction enabled status.

  • callauctionPriceFloor (character): Call auction price floor.

  • callauctionPriceCeiling (character): Call auction price ceiling.

  • callauctionFirstStageStartTime (integer): First stage start time.

  • callauctionSecondStageStartTime (integer): Second stage start time.

  • callauctionThirdStageStartTime (integer): Third stage start time.

  • tradingStartTime (integer): Trading start time.

Details

Workflow Overview

  1. Query Construction: Builds a query string with the optional market parameter using build_query().

  2. URL Assembly: Combines base_url, /api/v2/symbols, and the query string.

  3. HTTP Request: Sends a GET request with a 10-second timeout via httr::GET().

  4. Response Processing: Validates the response with process_kucoin_response() and extracts the "data" field.

  5. Data Conversion: Converts "data" into a data.table.

API Endpoint

GET https://api.kucoin.com/api/v2/symbols

Usage

Utilised to obtain a comprehensive list of trading symbols for market exploration or filtering.

Official Documentation

KuCoin Get All Symbols

Examples

if (FALSE) { # \dontrun{
main_async <- coro::async(function() {
  all_symbols <- await(get_all_symbols_impl())
  print(all_symbols)
  alts_symbols <- await(get_all_symbols_impl(market = "ALTS"))
  print(alts_symbols)
})
main_async()
while (!later::loop_empty()) later::run_now()
} # }