Crypto
get_symbols - Get All Symbol List
QuoteClient.get_symbols(sec_type=SecurityType.CC)
Description
Retrieve the list of all crypto symbols.
Rate Limit
Please refer to: API Rate Limits
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| sec_type | str or SecurityType | Yes | Fixed as SecurityType.CC or "CC" |
Return
Type
list
Example
from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import TigerOpenClientConfig
from tigeropen.common.consts import SecurityType
client_config = TigerOpenClientConfig(props_path='/path/to/your/properties/file/')
quote_client = QuoteClient(client_config)
symbols = quote_client.get_symbols(sec_type=SecurityType.CC)
print(symbols)Response Example
['APT.USD', 'IOTX.USD', 'USDT.USD', 'DYDX.USD', 'DOGE.USD', 'KAIA.USD', 'ATOM.USD', 'COMP.USD', 'UNI.USD', 'AAVE.USD', 'LDO.USD', 'LINK.USD', 'SNX.USD', 'OP.USD', 'DOT.USD', 'POL.USD', 'BTC.USD', 'SOL.USD', 'ARB.USD', 'TON.USD', 'AVAX.USD', 'MKR.USD', 'IMX.USD', 'ETH.USD', 'LTC.USD']
get_cc_briefs - Get Real-Time Quotes
QuoteClient.get_cc_briefs(symbols, sec_type=SecurityType.CC)
Description
Retrieve real-time crypto quotes.
Rate Limit
Please refer to: API Rate Limits
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | list[str] | Yes | List of symbols, max 50, e.g. ['BTC', 'ETH'] |
| sec_type | str or SecurityType | Yes | Fixed as SecurityType.CC or "CC" |
| lang | Language | No | Supported language, use enum constants from tigeropen.common.consts.Language, defaults to English |
Return
pandas.DataFrame
Structure:
| COLUMN | Type | Description |
|---|---|---|
| symbol | str | Symbol code |
| pre_close | float | Previous close price |
| latest_price | float | Latest price |
| latest_time | int | Latest trade time, millisecond timestamp |
| volume_decimal | float | Trading volume |
| open | float | Open price |
| high | float | High price |
| low | float | Low price |
| change | double | Price change |
| changeRate | double | Price change percentage |
Example
import pandas as pd
from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import TigerOpenClientConfig
from tigeropen.common.consts import SecurityType
client_config = TigerOpenClientConfig(props_path='/path/to/your/properties/file/')
quote_client = QuoteClient(client_config)
result = quote_client.get_cc_briefs(symbols=['BTC', 'ETH'], sec_type=SecurityType.CC)
print(result)Response Example
symbol open high low close pre_close latest_price latest_time \
0 BTC 71127.62 72200.0 69955.91 70932.55 71061.02 70932.55 1770608250067 \
1 ETH 2107.21 2148.9 2054.05 2089.56 2106.26 2089.56 1770608250068 \
change change_rate volume_decimal
-128.47 -0.001808 135.82381
-16.70 -0.007929 2815.58590
get_bars - Get K-Line Data
QuoteClient.get_bars(symbols, sec_type=SecurityType.CC, period=BarPeriod.DAY, begin_time=-1, end_time=-1, limit=251)
Description
Retrieve crypto K-line (candlestick) data, including: 1-minute, 60-minute, daily, weekly, and monthly intervals. Each request returns a maximum of 1200 records. It is recommended to use loop calls to retrieve longer historical data ranges to ensure API performance and stability. The API supports queries by date range or specific date.
Minute-level K-line: BTC data available from March 27, 2024 Daily and above (daily/weekly/monthly/yearly): BTC data available from July 13, 2010
Rate Limit
Please refer to: API Rate Limits
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | list[str] | Yes | List of symbol codes, max 50 per request (A-shares max 30), e.g. ['AAPL', 'GOOG'] |
| sec_type | str or SecurityType | Yes | Fixed as SecurityType.CC or "CC" |
| period | BarPeriod | No | K-line period. Default BarPeriod.DAY, use enum constants from tigeropen.common.consts.BarPeriod: 1min, 60min, day, week, month |
| begin_time | int or str | No | Start time for range query, timestamp recommended to avoid timezone issues across markets |
| end_time | int or str | No | End time for range query |
| limit | int | No | Limit number of records. Default 251, max 1200 |
Return
pandas.DataFrame
Structure:
| Parameter | Type | Description |
|---|---|---|
| time | int | Millisecond timestamp, e.g. 1639371600000 |
| open | float | Bar open price |
| close | float | Bar close price |
| high | float | Bar high price |
| low | float | Bar low price |
| volume_decimal | float | Bar trading volume |
Example
import pandas as pd
from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import TigerOpenClientConfig
from tigeropen.common.consts import SecurityType
client_config = TigerOpenClientConfig(props_path='/path/to/your/properties/file/')
quote_client = QuoteClient(client_config)
bars = quote_client.get_bars(['ETH'], sec_type=SecurityType.CC)
Response Example
symbol open close high low volume_decimal time
0 ETH 2107.21 2082.07 2148.90 2054.05 4408.5683 1770566400000
1 ETH 2052.48 2106.26 2143.31 2007.04 11426.7385 1770480000000
2 ETH 1980.74 2049.89 2118.52 1971.49 17089.0071 1770393600000
3 ETH 1957.51 1980.75 2014.57 1747.67 26795.9965 1770307200000
4 ETH 2148.31 1957.20 2189.48 1922.60 31535.3994 1770220800000
get_timeline - Get Intraday Time-Series Data
QuoteClient.get_timeline(symbols, sec_type=SecurityType.CC, begin_time=-1)
Description
Retrieve intraday time-series data for the most recent trading day. Time-series data is similar to minute K-lines, generating one record per minute. Only supports querying data for the latest trading day.
Rate Limit
Please refer to: API Rate Limits
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | list[str] | Yes | List of symbols, max 10 per request |
| begin_time | str | No | Start time for time-series data, supports millisecond timestamp or datetime string, e.g. 1639386000000 or '2019-06-07 23:00:00' or '2019-06-07', defaults to current day |
| sec_type | str or SecurityType | Yes | Fixed as SecurityType.CC or "CC" |
Return
pandas.DataFrame
Structure:
| COLUMN | Type | Description |
|---|---|---|
| symbol | str | Symbol code, e.g. AAPL |
| time | int | Millisecond timestamp, e.g. 1639386000000 |
| price | float | Close price for the current minute |
| avg_price | float | Volume-weighted average price up to current time |
| volume_decimal | int | Trading volume for this minute |
Example
import pandas as pd
from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import TigerOpenClientConfig
from tigeropen.common.consts import SecurityType
client_config = TigerOpenClientConfig(props_path='/path/to/your/properties/file/')
quote_client = QuoteClient(client_config)
timeline = quote_client.get_timeline(['ETH'], sec_type=SecurityType.CC)
Response Example
symbol pre_close trade_session time price volume_decimal
0 ETH 2106.26 Regular 1770566400000 2106.19 0.1676
1 ETH 2106.26 Regular 1770566460000 2104.82 55.0534
2 ETH 2106.26 Regular 1770566520000 2110.71 1.7288
3 ETH 2106.26 Regular 1770566580000 2111.03 0.9551
4 ETH 2106.26 Regular 1770566640000 2112.00 1.1343
5 Updated about 14 hours ago
