### Get Signal Alert Set List - Response Example Source: https://docs.aicoin.com/apis/features An example JSON response for the 'getSignalAlertSetList' API call. It includes a 'success' status, error code, and a 'data' object containing a 'list' of alerts and the total 'count'. Each alert object details its configuration. ```json { "success": true, "errorCode": 200, "error": "", "data": { "list": [ { "id": "139840", "tpKey": "btcusdt:binance", "setPrice": "201723.230", "subType": "ma:1440:single_ma:24", "setTime": "1696925566" } ], "count": "300" } } ``` -------------------------------- ### Aicoin API: Get Index List Request Example (cURL) Source: https://docs.aicoin.com/apis/markets This is an example request to get a list of indices from the Aicoin API using cURL. It requires authentication parameters such as 'AccessKeyId', 'SignatureNonce', 'Timestamp', and 'Signature'. This endpoint is used to retrieve a list of available financial indices. ```bash curl -G https://open.aicoin.com/api/v2/index/getIndex \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` -------------------------------- ### Get Signal Alert Set List - cURL Example Source: https://docs.aicoin.com/apis/features This cURL command illustrates how to retrieve a list of configured signal alerts. It requires API authentication parameters. The response will contain a list of alerts, each with its ID, trading pair, set price, type, and time. ```bash curl -G https://open.aicoin.com/api/v2/signal/getSignalAlertSetList \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` -------------------------------- ### Get Market News List (GET) Source: https://docs.aicoin.com/apis/contents Fetches a list of market news articles with pagination. Requires page number, page size, and authentication parameters. Returns news headlines, summaries, images, and publication dates. ```cURL curl -G https://open.aicoin.com/api/v2/content/square/market/news-list \ -d "page=1" \ -d "pageSize=20" \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` -------------------------------- ### Example API Request for Bitcoin Ticker Data (JavaScript) Source: https://docs.aicoin.com/quickstart This JavaScript example demonstrates how to make an API request to fetch real-time ticker data for Bitcoin. It includes preparing authentication parameters, generating a signature using HmacSHA1 and Base64, and making the fetch request with URL parameters. ```javascript const crypto = require('crypto'); // 1. 准备认证参数 const ACCESS_KEY_ID = 'YOUR_ACCESS_KEY_ID'; const ACCESS_SECRET = 'YOUR_ACCESS_SECRET'; const SIGNATURE_NONCE = crypto.randomBytes(4).toString('hex'); const TIMESTAMP = Math.floor(Date.now() / 1000).toString(); // 2. 生成签名 function generateSignature(accessKeyId, accessSecret, signatureNonce, timestamp) { const str = `AccessKeyId=${accessKeyId}&SignatureNonce=${signatureNonce}&Timestamp=${timestamp}`; const hmac = crypto.createHmac('sha1', accessSecret); hmac.update(str); return Buffer.from(hmac.digest('hex'), 'binary').toString('base64'); } const signature = generateSignature( ACCESS_KEY_ID, ACCESS_SECRET, SIGNATURE_NONCE, TIMESTAMP ); // 3. 发起请求 fetch('https://open.aicoin.com/api/v2/coin/ticker?' + new URLSearchParams({ coin_list: 'bitcoin', AccessKeyId: ACCESS_KEY_ID, SignatureNonce: SIGNATURE_NONCE, Timestamp: TIMESTAMP, Signature: signature })) .then(response => response.json()) .then(data => console.log(data)); ``` -------------------------------- ### GET /v2/mix/liq - Get Liquidation Data Source: https://docs.aicoin.com/apis/features Retrieves market liquidation data statistics. Supports filtering by currency or platform. ```APIDOC ## GET /v2/mix/liq ### Description This endpoint returns market liquidation data statistics. You can query by currency or platform. ### Method GET ### Endpoint /v2/mix/liq ### Parameters #### Query Parameters - **currency** (string) - Optional - Pricing unit, defaults to `cny`. Allowed values: `cny`, `usd`. - **type** (integer) - Optional - Query type. `1` for by currency, `2` for by platform. Defaults to all. - **coinKey** (string) - Optional - Currency key, used when querying by currency. - **marketKey** (string) - Optional - Market key, used when querying by platform. - **AccessKeyId** (string) - Required - Your user access key ID. - **SignatureNonce** (string) - Required - A unique nonce for signature generation. - **Timestamp** (string) - Required - The request timestamp in seconds, valid for 30 seconds. - **Signature** (string) - Required - The signature generated using HmacSHA1 + Base64. ### Request Example ``` GET /v2/mix/liq?currency=cny&type=1&coinKey=btc&AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **errorCode** (integer) - The status code of the response. - **error** (string) - Error message if the request failed. - **data** (object) - Contains the detailed data. - **detail** (object) - Liquidation details. - **liq1h** (string) - Total liquidation amount in the last 1 hour. - **liqLong1h** (string) - Long liquidation amount in the last 1 hour. - **liqShort1h** (string) - Short liquidation amount in the last 1 hour. - **liq24h** (string) - Total liquidation amount in the last 24 hours. - **liqLong24h** (string) - Long liquidation amount in the last 24 hours. - **liqShort24h** (string) - Short liquidation amount in the last 24 hours. - **maxLiq** (string) - Maximum single liquidation amount in the last 24 hours. - **maxLiqMarket** (string) - Market with the maximum liquidation in the last 24 hours (original field). - **liq24HMaxMarket** (string) - Market with the maximum liquidation in the last 24 hours (new field, marketKey). - **liq24HMaxTpKey** (string) - Trading pair with the maximum liquidation in the last 24 hours. #### Response Example ```json { "success": true, "errorCode": 200, "error": "", "data": { "detail": { "liq1h": "2327157.10349", "liqLong1h": "2327157.10349", "liqShort1h": "2327157.10349", "liq24h": "2327157.10349", "liqLong24h": "2327157.10349", "liqShort24h": "2327157.10349", "maxLiq": "2327157.10349", "maxLiqMarket": "欧易OKX-BTC", "liq24HMaxMarket": "okcoinfutures", "liq24HMaxTpKey": "btcswapusdt:okcoinfutures" } } } ``` ``` -------------------------------- ### Aicoin API Response Example Source: https://docs.aicoin.com/apis/features Example of a successful response from the Aicoin REST API for fetching trading pair data. Includes 'success' status, 'errorCode', 'error' message, and 'data' array containing trading pair details. ```json { "success": true, "errorCode": 200, "error": "", "data": [ { "key": "btcusdt:okex", "currency": "usdt", "en_name": "Bitcoin", "cn_name": "比特币", "show": "btc", "trade_type": "spot" } ] } ``` -------------------------------- ### Aicoin WebSocket Push Data Example Source: https://docs.aicoin.com/apis/features Example of data pushed from the Aicoin WebSocket API for large trade information. Includes a 'mapping' array defining the data fields and a 'list' array containing actual trade data records. ```json { "mapping": [ "timestamp", "id", "coin_type", "trade_type", "start_price", "stop_price", "max_price", "slippage_price", "max_amount", "max_vol", "total_amount", "total_vol", "total_count", "total_turnover" ], "list": [ [ "1585450970650", "1394", "okb", "bid", "4.08900000", "4.08900000", "4.08900000", "0.00000000", "9953.00000000", "9953.00000000", "9953.00000000", "9953.00000000", "1", "40697.81700000" ] ] } ``` -------------------------------- ### GET /v2/coin - Get Coin List Source: https://docs.aicoin.com/apis/coins This endpoint returns basic information for all supported coins. ```APIDOC ## GET /v2/coin ### Description This endpoint returns basic information for all supported coins. ### Method GET ### Endpoint /v2/coin ### Parameters #### Query Parameters - **AccessKeyId** (string) - Required - User access key ID. - **SignatureNonce** (string) - Required - Signature nonce. - **Timestamp** (string) - Required - Request timestamp (seconds), valid for 30 seconds. - **Signature** (string) - Required - Signature generated using HmacSHA1 + Base64. Refer to authentication parameter guide. ### Request Example ```curl curl -G https://open.aicoin.com/api/v2/coin \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` ### Response #### Success Response (200) - **success** (boolean) - API status. - **errorCode** (integer) - Status code. - **error** (string) - Error message. - **data** (array) - Coin list data. - **coin_key** (string) - Coin primary key. - **hash_key** (string) - Coin hash key. - **show** (string) - Coin symbol. - **cn_name** (string) - Coin Chinese name. - **en_name** (string) - Coin English name. #### Response Example ```json { "success": true, "errorCode": 200, "data": [ { "coin_key": "bitcoin", "show": "BTC", "cn_name": "比特币", "en_name": "Bitcoin", "hash_key": "A92455EC" } ] } ``` ``` -------------------------------- ### GET /v2/signal/signalAlertConf Source: https://docs.aicoin.com/apis/features Retrieves signal alert configuration information. ```APIDOC ## GET /v2/signal/signalAlertConf ### Description Retrieves signal alert configuration information. ### Method GET ### Endpoint /v2/signal/signalAlertConf ### Parameters #### Query Parameters - **lan** (string) - Optional - Language (cn for Chinese, en for English). - **AccessKeyId** (string) - Required - User access key ID. - **SignatureNonce** (string) - Required - Signature nonce. - **Timestamp** (string) - Required - Request timestamp (seconds), valid for 30 seconds. - **Signature** (string) - Required - Signature generated using HmacSHA1 + Base64. ### Request Example ```curl curl -G https://open.aicoin.com/api/v2/signal/signalAlertConf \ -d "lan=cn" \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` ### Response #### Success Response (200) - **success** (boolean) - API status. - **errorCode** (integer) - Status code. - **error** (string) - Error message. - **data** (object) - Returned data. - **alertConfig** (array) - Alert configuration list. - **config** (array) - Trigger condition list. - **appPicLink** (string) - Example image for trigger condition. - **label** (string) - Label for trigger condition. - **name** (string) - Name of trigger condition. - **picLink** (string) - Example image for trigger condition. - **signalType** (string) - Signal market type. - **triggerKey** (string) - Signal key. - **period** (array) - Alert period (in minutes). #### Response Example (Response structure for this endpoint is complex and depends on the 'lan' parameter. Refer to API provider for detailed examples.) ``` -------------------------------- ### Estimated Liquidation History Response Example Source: https://docs.aicoin.com/apis/coins This is an example of the JSON response received when querying for estimated liquidation history. It includes a status code, message, and the liquidation data structured by time and leverage. ```JSON { "code": "0", "msg": "success", "data": [ { "time": 1700000000000, "data_map": { "50": { "mapping": ["from", "to", "turnover"], "short": [ [184601.0, 104672.4, 66262.0273686], [104672.4, 104743.8, 567185.0349501] ], "long": [ [100499.0, 100567.6, 39065.6318472], [100567.6, 100636.2, 146365.2013005] ], "timestamp": 1749783658 } } } ] } ``` -------------------------------- ### GET /v2/content/exchange-listing-flash Source: https://docs.aicoin.com/apis/contents Retrieves flash news for specific exchanges with customizable language and pagination. ```APIDOC ## GET /v2/content/exchange-listing-flash ### Description Retrieves flash news for specific exchanges with customizable language and pagination. ### Method GET ### Endpoint /v2/content/exchange-listing-flash ### Parameters #### Query Parameters - **language** (string) - Optional - Language option: cn (Chinese), tc (Traditional Chinese), en (English). Default is 'cn'. - **memberIds** (array or string) - Optional - List of exchange member IDs (up to 5). Can be in array format (`memberIds[]=477&memberIds[]=1509`) or comma-separated (`memberIds=477,1509`). Default is `[477, 1509]` (Binance, Bitget). - **pageSize** (integer) - Optional - Number of items per page. Default is 20. - **AccessKeyId** (string) - Required - User access key ID. - **SignatureNonce** (string) - Required - Signature nonce. - **Timestamp** (string) - Required - Request timestamp in seconds (valid for 30 seconds). - **Signature** (string) - Required - Signature generated using HmacSHA1 + Base64. ### Request Example ```curl curl -G https://open.aicoin.com/api/v2/content/exchange-listing-flash \ -d "language=cn" \ -d "memberIds[]=477" \ -d "memberIds[]=1509" \ -d "pageSize=20" \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` ### Response #### Success Response (200) - **success** (boolean) - API call status. - **errorCode** (integer) - Status code. - **error** (string) - Error message. - **data** (array) - Array of news items. - **id** (integer) - News ID. - **title** (string) - News title. - **content** (string) - News content. - **language** (string) - Language type. - **createtime** (integer) - Publication timestamp. - **newsType** (integer) - News type (fixed at 2 for exchange flash news). #### Response Example ```json { "success": true, "errorCode": 200, "error": "", "data": [ { "id": 404384, "title": "BNB/USDT合约升级完成公告", "content": "Bitget全球用户:\nBitget已完成本次BNB/USDT合约升级,交易已恢复...", "language": "CN", "createtime": 1565867889, "newsType": 2 } ] } ``` ``` -------------------------------- ### GET /v2/mix/nav - Get Navigation Bar Data Source: https://docs.aicoin.com/apis/features This endpoint returns data for the navigation bar, including market and currency information. ```APIDOC ## GET /v2/mix/nav ### Description This endpoint returns navigation bar data. ### Method GET ### Endpoint /v2/mix/nav ### Parameters #### Query Parameters - **lan** (string) - Optional - Language, 'cn' for Chinese, 'en' for English. - **AccessKeyId** (string) - Required - User access key ID. - **SignatureNonce** (string) - Required - Signature nonce. - **Timestamp** (string) - Required - Request timestamp (seconds), valid for 30 seconds. - **Signature** (string) - Required - Signature generated using HmacSHA1 + Base64. Refer to 'How to get API authentication parameters' for details. ### Request Example ```curl curl -G https://open.aicoin.com/api/v2/mix/nav \ -d "lan=cn" \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the API request was successful. - **errorCode** (integer) - The status code of the response. - **error** (string) - Error message if the request failed. - **data** (array) - Contains the returned data. - **key** (string) - Primary key. - **key_type** (string) - Primary key type, 1 for trading pair, 3 for index. - **coin_show** (string) - Abbreviated currency name. - **last** (string) - Latest price. - **coin_name** (string) - Abbreviated currency name. - **market_name** (string) - Platform name. - **currency_str** (string) - Pricing unit. - **trades** (array) - K-line data. #### Response Example ```json { "success": true, "errorCode": 200, "data": [{ "key": "btc_usdt", "key_type": "1", "coin_show": "BTC", "last": "42000.00", "coin_name": "Bitcoin", "market_name": "Binance", "currency_str": "USDT", "trades": [] }] } ``` ``` -------------------------------- ### GET /v2/market Source: https://docs.aicoin.com/apis/markets Retrieves basic information for all trading platforms available on Aicoin. ```APIDOC ## GET /v2/market ### Description Retrieves basic information for all trading platforms available on Aicoin. ### Method GET ### Endpoint /v2/market ### Query Parameters - **AccessKeyId** (string) - Required - Your Aicoin API Access Key ID. - **SignatureNonce** (string) - Required - A random nonce for signature generation. - **Timestamp** (string) - Required - The current timestamp in seconds. - **Signature** (string) - Required - The generated signature for authentication. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **errorCode** (integer) - The status code of the response. - **error** (string) - An error message if the request failed. - **data** (array) - An array of platform objects. - **key** (string) - The unique identifier for the platform. - **en_name** (string) - The English name of the platform. - **cn_name** (string) - The Chinese name of the platform. #### Response Example ```json { "success": true, "errorCode": 200, "error": "", "data": [ { "key": "okex", "en_name": "OKEx", "cn_name": "欧易OKX" } ] } ``` ``` -------------------------------- ### GET /v2/content/news-list Source: https://docs.aicoin.com/apis/contents Retrieves a list of news articles with pagination options. ```APIDOC ## GET /v2/content/news-list ### Description Retrieves a list of news articles with pagination options. ### Method GET ### Endpoint /v2/content/news-list ### Parameters #### Query Parameters - **page** (integer) - Optional - Current page number. Default is 1. - **pageSize** (integer) - Optional - Number of items per page (maximum 20). - **AccessKeyId** (string) - Required - User access key ID. - **SignatureNonce** (string) - Required - Signature nonce. - **Timestamp** (string) - Required - Request timestamp in seconds (valid for 30 seconds). - **Signature** (string) - Required - Signature generated using HmacSHA1 + Base64. ### Request Example ```curl curl -G https://open.aicoin.com/api/v2/content/news-list \ -d "page=1" \ -d "pageSize=20" \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` ### Response #### Success Response (200) - **success** (boolean) - API call status. - **errorCode** (integer) - Status code. - **error** (string) - Error message. - **data** (array) - Array of news items. - **id** (integer) - News ID. - **title** (string) - News title. - **describe** (string) - News summary. - **cover** (string) - Cover image URL. - **createtime** (integer) - Publication timestamp. - **language** (integer) - Language of the news (10 or 0 for Chinese, 11 for English). - **columnist** (object) - Author information. - **nick_name** (string) - Author's nickname. - **avatar** (string) - Author's avatar URL. - **avatar_black** (string) - Author's avatar URL for dark mode. #### Response Example ```json { "success": true, "errorCode": 200, "error": "", "data": [ { "id": 55836, "title": "比特币突破4.5万美元,创近两年新高", "describe": "比特币价格在亚洲交易时段突破4.5万美元关口,创下2022年4月以来新高。分析师认为,此轮上涨主要受到现货ETF获批预期和比特币减半周期临近等因素推动。", "cover": "https://static.aicoinstorge.com/article/20231208/btc_price_45k.jpg", "createtime": 1702022400, "language": 10, "columnist": { "nick_name": "Sarah Chen", "avatar": "https://static.aicoinstorge.com/columnist/20230615/sarah_chen.jpg", "avatar_black": "https://static.aicoinstorge.com/columnist/20230615/sarah_chen_dark.jpg" } } ] } ``` ``` -------------------------------- ### GET /v2/index/getIndex Source: https://docs.aicoin.com/apis/markets Retrieves a list of available indices. ```APIDOC ## GET /v2/index/getIndex ### Description This endpoint is used to obtain a list of indices. ### Method GET ### Endpoint /v2/index/getIndex ### Parameters #### Query Parameters - **AccessKeyId** (string) - Required - User access key ID. - **SignatureNonce** (string) - Required - Signature nonce. - **Timestamp** (string) - Required - Request timestamp (seconds), valid for 30 seconds. - **Signature** (string) - Required - Signature generated using HmacSHA1 + Base64. Refer to API authentication parameter acquisition. ### Request Example (No specific request example provided in the source text, but it would follow the pattern of other GET requests with authentication parameters) ### Response #### Success Response (200) (The response structure for this endpoint was not fully detailed in the provided text. It is expected to return a list of indices, likely containing keys and display names.) #### Response Example (No specific response example provided in the source text.) ``` -------------------------------- ### GET /v2/index/getIndex Source: https://docs.aicoin.com/apis/markets Retrieves a list of indices with their details, including name, description, and 24-hour performance. ```APIDOC ## GET /v2/index/getIndex ### Description Retrieves a list of indices with their details, including name, description, and 24-hour performance. ### Method GET ### Endpoint /v2/index/getIndex ### Parameters #### Query Parameters - **AccessKeyId** (string) - Required - User access key ID. - **SignatureNonce** (string) - Required - Signature nonce. - **Timestamp** (string) - Required - Request timestamp (seconds), valid for 30 seconds. - **Signature** (string) - Required - Signature generated using HmacSHA1 + Base64. ### Request Example ```curl curl -G https://open.aicoin.com/api/v2/index/getIndex \ -H "AccessKeyId: YOUR_ACCESS_KEY" \ -H "SignatureNonce: RANDOM_NONCE" \ -H "Timestamp: TIMESTAMP" \ -H "Signature: YOUR_SIGNATURE" ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates the status of the request. - **errorCode** (integer) - The status code of the response. - **error** (string) - Error message if the request failed. - **data** (object) - Contains the returned data. - **list** (array) - List of indices. - **key** (string) - Index primary key. - **cn_name** (string) - Index Chinese name. - **en_name** (string) - Index English name. - **show** (string) - Index abbreviation. - **describe** (string) - Index description. - **degree24h** (string) - 24-hour percentage change. - **price** (string) - Latest price. - **en_type** (string) - English type. - **cn_type** (string) - Chinese type. - **count** (string) - Number of indices. #### Response Example ```json { "success": true, "errorCode": 200, "error": "", "data": { "list": [ { "key": "i:fgi:alternative", "cn_name": "恐惧&贪婪指数", "en_name": "Crypto Fear & Greed Index", "show": "FGI", "describe": "描述", "degree24h": "-6.00", "price": "47", "cn_type": "", "en_type": "" } ], "count": "156" } } ``` ``` -------------------------------- ### GET /v2/index/indexPrice Source: https://docs.aicoin.com/apis/markets Fetches the index price data for a given index key and currency. ```APIDOC ## GET /v2/index/indexPrice ### Description This endpoint is used to obtain index price data. ### Method GET ### Endpoint /v2/index/indexPrice ### Parameters #### Query Parameters - **key** (string) - Required - The index primary key (obtained via /api/v2/index/getIndex). - **currency** (string) - Required - The pricing currency (e.g., cny, usd). - **AccessKeyId** (string) - Required - User access key ID. - **SignatureNonce** (string) - Required - Signature nonce. - **Timestamp** (string) - Required - Request timestamp (seconds), valid for 30 seconds. - **Signature** (string) - Required - Signature generated using HmacSHA1 + Base64. Refer to API authentication parameter acquisition. ### Request Example ```curl curl -G https://open.aicoin.com/api/v2/index/indexPrice \ -d "key=i:diniw:ice" \ -d "currency=usd" \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` ### Response #### Success Response (200) - **success** (boolean) - Interface status. - **errorCode** (integer) - Status code. - **error** (string) - Error message. - **data** (object) - Returned data. - **price** (string) - Latest price. - **open** (string) - Today's opening price. - **high** (string) - 24-hour highest price. - **low** (string) - 24-hour lowest price. - **close** (string) - Yesterday's closing price. - **degree24H** (string) - 24-hour price change percentage. - **change24H** (string) - 24-hour price change. - **up** (string) - Upward movement indicator. - **down** (string) - Downward movement indicator. #### Response Example ```json { "success": true, "errorCode": 200, "error": "", "data": { "price": "933.2206291652", "open": "966.1194468979", "high": "968.23409269", "low": "890.6764162168", "close": "906.5192845811", "degree24H": "2.88", "change24H": "26.13", "up": "0", "down": "0" } } ``` ``` -------------------------------- ### GET /v2/index/indexInfo Source: https://docs.aicoin.com/apis/markets Retrieves detailed information about a specific index. ```APIDOC ## GET /v2/index/indexInfo ### Description This endpoint is used to obtain detailed information about an index. ### Method GET ### Endpoint /v2/index/indexInfo ### Parameters #### Query Parameters - **key** (string) - Required - The index primary key (obtained via /api/v2/index/getIndex). - **lan** (string) - Optional - Language for the response (e.g., en, cn). - **AccessKeyId** (string) - Required - User access key ID. - **SignatureNonce** (string) - Required - Signature nonce. - **Timestamp** (string) - Required - Request timestamp (seconds), valid for 30 seconds. - **Signature** (string) - Required - Signature generated using HmacSHA1 + Base64. Refer to API authentication parameter acquisition. ### Request Example ```curl curl -G https://open.aicoin.com/api/v2/index/indexInfo \ -d "key=i:diniw:ice" \ -d "lan=cn" ``` ### Response #### Success Response (200) - **success** (boolean) - Interface status. - **errorCode** (integer) - Status code. - **error** (string) - Error message. - **data** (object) - Returned data. - **show** (string) - Index abbreviation. - **name** (string) - Index name. - **link** (string) - Official website link. - **release_date** (string) - Release date. - **amount** (string) - Number of constituent coins. - **introduce** (string) - Index introduction. - **file_name** (string) - Compilation file name. - **file_link** (string) - Compilation file link. #### Response Example ```json { "success": true, "errorCode": 200, "error": "", "data": { "show": "DXY", "name": "美元指数", "link": "https://finance.sina.com.cn/money/forex/hq/DINIW.shtml", "release_date": "", "amount": "0", "introduce": "", "file_name": "", "file_link": "" } } ``` ``` -------------------------------- ### GET /v2/content/news-detail Source: https://docs.aicoin.com/apis/contents Retrieves the detailed content of a specific news article. ```APIDOC ## GET /v2/content/news-detail ### Description Retrieves the detailed content of a specific news article. ### Method GET ### Endpoint /v2/content/news-detail ### Parameters #### Query Parameters - **id** (integer) - Required - The ID of the news article to retrieve. - **language** (string) - Optional - Language option: cn (Chinese), tc (Traditional Chinese), en (English). Default is 'cn'. - **AccessKeyId** (string) - Required - User access key ID. - **SignatureNonce** (string) - Required - Signature nonce. - **Timestamp** (string) - Required - Request timestamp in seconds (valid for 30 seconds). - **Signature** (string) - Required - Signature generated using HmacSHA1 + Base64. ### Request Example ```curl curl -G https://open.aicoin.com/api/v2/content/news-detail \ -d "id=55836" \ -d "language=cn" \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` ### Response #### Success Response (200) - **success** (boolean) - API call status. - **errorCode** (integer) - Status code. - **error** (string) - Error message. - **data** (object) - The news article details. - **id** (integer) - News ID. - **title** (string) - News title. - **content** (string) - Full news content. - **language** (string) - Language type. - **createtime** (integer) - Publication timestamp. - **newsType** (integer) - News type (fixed at 2 for exchange flash news). - **author** (object) - Author information. - **nick_name** (string) - Author's nickname. - **avatar** (string) - Author's avatar URL. - **avatar_black** (string) - Author's avatar URL for dark mode. #### Response Example ```json { "success": true, "errorCode": 200, "error": "", "data": { "id": 55836, "title": "比特币突破4.5万美元,创近两年新高", "content": "比特币价格在亚洲交易时段突破4.5万美元关口,创下2022年4月以来新高。分析师认为,此轮上涨主要受到现货ETF获批预期和比特币减半周期临近等因素推动。", "language": "CN", "createtime": 1702022400, "newsType": 2, "author": { "nick_name": "Sarah Chen", "avatar": "https://static.aicoinstorge.com/columnist/20230615/sarah_chen.jpg", "avatar_black": "https://static.aicoinstorge.com/columnist/20230615/sarah_chen_dark.jpg" } } } ``` ``` -------------------------------- ### Response Example for Signal Alert Configuration Source: https://docs.aicoin.com/apis/features This JSON illustrates the structure of a response containing alert configuration details. It includes information about alert triggers, such as MA crosses, along with available time periods for analysis. ```json { "success": true, "errorCode": 200, "error": "", "data": { "alertConfig": [ { "config": [ { "appPicLink": "https://static.aicoinstorge.com/signal_alert_trigger_img/20220915/166322507728235.png", "label": "", "name": "单MA金叉死叉", "picLink": "https://static.aicoinstorge.com/signal_alert_trigger_img/20220801/165933725580834.png", "signalType": "trend", "triggerKey": "single_ma" } ], "indicatorKey": "ma", "label": "", "name": "MA", "sort": "1" } ], "period": [1, 3, 5, 10, 15, 30, 60, 120, 180, 240, 360, 720, 1440] } } ``` -------------------------------- ### Get Anomaly Signal Data - cURL Example Source: https://docs.aicoin.com/apis/features This cURL request demonstrates how to fetch anomaly signal data from the Aicoin API. It requires specifying a 'type' of anomaly, and optionally a 'currency' for pricing. API authentication is also necessary. ```bash curl -G https://open.aicoin.com/api/v2/signal/changeSignal \ -d "type=1" \ -d "currency=usd" \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` -------------------------------- ### Get Historical Futures Liquidation Map Response Source: https://docs.aicoin.com/apis/coins Example JSON response for the futures liquidation map endpoint. It contains timestamped liquidation data categorized by leverage, including mapping information, short and long liquidation volumes, and the latest timestamp. ```json { "code": "0", "msg": "success", "data": { "time": 1700000000000, "data_map": { "50": { "mapping": ["from", "to", "turnover"], "short": [ [184601.0, 104672.4, 66262.0273686], [104672.4, 104743.8, 567185.0349501] ], "long": [ [100499.0, 100567.6, 39065.6318472], [100567.6, 100636.2, 146365.2013005] ], "timestamp": 1749783658 }, "25": { "mapping": ["from", "to", "turnover"], "short": [ [184601.0, 104672.4, 66262.0273686], [104672.4, 104743.8, 567185.0349501] ], "long": [ [100499.0, 100567.6, 39065.6318472], [100567.6, 100636.2, 146365.2013005] ], "timestamp": 1749783658 } } } } ``` -------------------------------- ### Get Historical Order Book Depth Response Source: https://docs.aicoin.com/apis/coins Example JSON response for the historical order book depth endpoint. It returns an array of objects, each containing a timestamp, 'asks' (sell orders) with price and quantity, and 'bids' (buy orders) with price and quantity. ```json { "code": "0", "msg": "success", "data": [ { "time": 1700000000000, "asks": [ [104150.5, 2.5], [104151.0, 1.8], [104152.0, 3.2] ], "bids": [ [104149.5, 1.9], [104149.0, 2.1], [104148.0, 1.5] ] } ] } ``` -------------------------------- ### Response Example for Strategy Signal Data Source: https://docs.aicoin.com/apis/features This JSON object shows a typical response when retrieving strategy signal data. It includes a list of data fields ('mapping'), the actual signal data ('list'), and a list of supported strategies and coin types ('supportList'). ```json { "success": true, "errorCode": 200, "error": "", "data": { "mapping": [ "id", "signal_time", "signal_type", "side", "capital_rate", "history_win_rate", "advise_win_rate", "advise_loss_rate", "state", "price" ], "list": [ [ "81544", "1638644195685", "depth_win_one", "sell", "11.471949", "0.641414", "0.0900", "-0.1000", "0", "" ] ], "supportList": [ { "strategy": "depth_buy_one", "coinType": "ethereum", "category": "spot" }, { "strategy": "td_buy_one", "coinType": "binanceCoin", "category": "spot" } ] } } ``` -------------------------------- ### Get Historical Order Book Depth (cURL) Source: https://docs.aicoin.com/apis/coins Fetches historical order book depth data for a specified trading pair. Parameters include the trading pair key, start and end timestamps, and a limit for the number of returned entries. Authentication is required. ```curl curl -G https://open.aicoin.com/api/upgrade/v2/futures/historical-depth \ -d key=btcswapusdt:okcoinfutures \ -d limit=100 \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` -------------------------------- ### Fetch Index Data (GET /v2/index/getIndex) Source: https://docs.aicoin.com/apis/markets Retrieves a list of indices with their details such as name, description, and price changes. Requires authentication headers. ```bash curl -G https://open.aicoin.com/api/v2/index/getIndex \ -H "AccessKeyId: YOUR_ACCESS_KEY" \ -H "SignatureNonce: RANDOM_NONCE" \ -H "Timestamp: TIMESTAMP" \ -H "Signature: YOUR_SIGNATURE" ``` -------------------------------- ### Get News List (cURL) Source: https://docs.aicoin.com/apis/contents Fetches a list of news articles. Allows pagination by specifying page number and page size. Requires authentication with AccessKeyId, SignatureNonce, Timestamp, and Signature. ```bash curl -G https://open.aicoin.com/api/v2/content/news-list \ -d "page=1" \ -d "pageSize=20" \ -d "AccessKeyId=YOUR_ACCESS_KEY_ID" \ -d "SignatureNonce=RANDOM_NONCE" \ -d "Timestamp=CURRENT_TIMESTAMP" \ -d "Signature=YOUR_SIGNATURE" ``` -------------------------------- ### Get Futures Weighted Funding Rate History Response Source: https://docs.aicoin.com/apis/coins Example JSON response for the futures weighted funding rate history endpoint. It contains a status code, message, and an array of data objects, each with timestamp, open, high, low, and close funding rates. ```JSON { "code": "0", "msg": "success", "data": [ { "time": 1749026520000, "open": "2.939e-05", "high": "2.939e-05", "low": "2.939e-05", "close": "2.939e-05" } ] } ```