edgeX 백서

edgeX

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 22쪽 중 8쪽

TakerFeeRate | string(decimal) | Default taker fee rate for the contract | | defaultMakerFeeRate | string(decimal) | Default maker fee rate for the contract | | defaultLeverage | string(decimal) | Initial default leverage multiplier when user has not set a trading leverage | | liquidateFeeRate | string(decimal) | Liquidation fee rate | | enableTrade | boolean | Whether trading is allowed. true: allowed, false: not allowed | | enableDisplay | boolean | Whether to display. true: display, false: hide | | enableOpenPosition | boolean | Whether opening positions is allowed. true: allowed to open and close, false: only allowed to close positions | | fundingInterestRate | string(decimal) | Default value of overall interest rate, e.g., 0.0003 | | fundingImpactMarginNotional | string(decimal) | Quantity for calculating depth-weighted bid/ask price, e.g., 8000 | | fundingMaxRate | string(decimal) | Maximum funding rate, e.g., 0.000234 | | fundingMinRate | string(decimal) | Minimum funding rate, e.g., -0.000234 | | fundingRateIntervalMin | string(decimal) | Settlement interval of funding rate (in minutes, must be an integer multiple of 60 minutes, settlement starts from 00:00 UTC) decimal | | displayDigitMerge | string(decimal) | Depth merge. e.g., "1,0.1,0.001" | | displayMaxLeverage | string(decimal) | Maximum leverage multiplier to display, decimal. e.g., 20 | | displayMinLeverage | string(decimal) | Minimum leverage multiplier to display, decimal. e.g., 1 | | displayNewIcon | boolean | Whether it is a newly listed pair | | displayHotIcon | boolean | Whether it is a hot pair | | matchServerName | string | Matching service name, e.g., xxx-match-server-a. This value cannot be changed once configured, otherwise data migration is required. | | starkExSyntheticAssetId | string(int64) | Synthetic asset id of the current pair, bigint for hex str. | | starkExResolution | string(int64) | Processing precision of the quantity held by the current pair, bigint for hex str | | starkExOraclePriceQuorum | string(int64) | Legal number of oracle prices, bigint for hex str | | starkExOraclePriceSignedAssetId | \[string] | bigint for hex str | | starkExOraclePriceSigner | \[string] | bigint for hex str | ### RiskTier | Name | Type | Description | | ----------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | tier | integer(int32) | Tier, starting from 1 | | positionValueUpperBound | string(decimal) | Upper limit of position value for the tier (inclusive) | | maxLeverage | string(decimal) | Maximum available leverage for the tier | | maintenanceMarginRate | string(decimal) | Maintenance margin rate for the tier (only for display, the actual maintenance margin rate used is stark\_ex\_risk / 2^32 as an accurate maintenance margin rate), decimal | | starkExRisk | string(int64) | 1 ≤ risk < 2^32 | | starkExUpperBound | string(int64) | bigint. 0 ≤ upper\_bound ≤ 2^128-1 | ### CoinMetadata | Name | Type | Description | | ----------------- | --------------- | --------------------------------------------------------------------------------------------------------------- | | coinId | string(int64) | Coin id | | coinName | string | Coin name | | stepSize | string(decimal) | Minimum quantity unit | | showStepSize | string(decimal) | Minimum unit displayed to the user | | iconUrl | string(url) | Coin icon url | | starkExAssetId | string(int64) | Historical response field name for the asset id used by backend metadata. If empty, the value is not available. | | starkExResolution | string | Historical response field name for backend precision metadata. If empty, the value is not available. | ### GlobalMetadata | Name | Type | Description | | ---------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | appName | string | xxx | | appEnv | string | dev/testnet/mainnet | | appOnlySignOn | string | <https://xxx.exchange> | | feeAccountId | string(int64) | Fee account id | | feeAccountL2Key | string | Fee account l2Key, bigint for hex str | | poolAccountId | string(int64) | Asset pool account id | | poolAccountL2Key | string | Asset pool account l2Key, bigint for hex str | | fastWithdrawAccountId | string(int64) | Fast withdrawal account id | | fastWithdrawAccountL2Key | string | Fast withdrawal account l2Key, bigint for hex str | | fastWithdrawMaxAmount | string | Maximum amount for fast withdrawal | | fastWithdrawRegistryAddress | string | Fast withdrawal account address | | starkExChainId | string | Historical response field name for the chain id in backend metadata. Bigint in hex string format. | | starkExContractAddress | string | Historical response field name for the contract address used by backend metadata. | | starkExCollateralCoin | [Coin](#schemacoin) | Coin meta information | | starkExMaxFundingRate | integer(int32) | Maximum funding rate per second after starkex precision processing. i.e. stark\_ex\_max\_funding\_rate \* 2^32 is the actual maximum funding rate per second. E.g.: 1120 | | starkExOrdersTreeHeight | integer(int32) | Order merkle tree height. E.g.: 64 | | starkExPositionsTreeHeight | integer(int32) | Account merkle tree height. E.g.: 64 | | starkExFundingValidityPeriod | integer(int32) | Funding rate submission validity period in seconds. E.g.: 86400 | | starkExPriceValidityPeriod | integer(int32) | Oracle price submission validity period in seconds. E.g.: 86400 | | maintenanceReason | string | Maintenance reason, empty if no maintenance | ### ServerTimeResult | Name | Type | Description | | ------------ | ------------------------------------- | ------------------------------------------------------- | | code | string | Status code. "SUCCESS" for success, others for failure. | | data | [GetServerTime](#schemagetservertime) | Server time | | errorParam | object | Parameter information in error message | | requestTime | string(timestamp) | Server request receiving time | | responseTime | string(timestamp) | Server response returning time | | traceId | string | Call traceId | ### ServerTimePayload | Name | Type | Description | | ---------- | ------------- | ------------------------------ | | timeMillis | string(int64) | Server timestamp, milliseconds | # Quote API ## When to Use This Page Use quote endpoints for market data reads such as order book depth, K-line history, ticker snapshots, open interest, and market status. These endpoints are public and do not require authentication. ## Minimal Calls Get depth: ```bash curl -X GET "https://<api-domain>/api/v2/public/quote/getDepth?contractId=10000001&level=15" ``` Get ticker summary: ```bash curl -X GET "https://<api-domain>/api/v2/public/quote/getTickerSummary?contractId=10000001" ``` ## Common Notes * Load metadata first so you know which `contractId`, precision, and enums are valid. * Quote endpoints are read-only; no authentication headers are required. * For charting or polling clients, prefer a stable refresh cadence and switch to WebSocket when you need real-time updates. ## GET Query Order Book Depth GET /api/v2/public/quote/getDepth ### Request Parameters | Name | Type | Required | Description | | ---------- | ------- | -------- | -------------------------------------------------- | | contractId | string | No | Contract ID | | level | integer | Yes | Depth level. Currently 15 and 200 levels available | > Response Example > 200 Response ```json { "code": "SUCCESS", "data": [ { "startVersion": "201223746", "endVersion": "201223747", "level": 15, "contractId": "10000001", "contractName": "BTCUSDT", "asks": [ { "price": "101695.9", "size": "0.579" }, { "price": "101696.0", "size": "0.923" }, { "price": "101703.0", "size": "0.129" } ], "bids": [ { "price": "101695.5", "size": "1.710" }, { "price": "101694.1", "size": "0.189" }, { "price": "101692.9", "size": "0.223" } ], "depthType": "SNAPSHOT" } ], "msg": null, "errorParam": null, "requestTime": "1734598036434", "responseTime": "1734598036435", "traceId": "99b69f04bac0df6e37961f249b9545e4" } ``` ### Response | Status Code | Status Code Meaning | Description | Data Model | | ----------- | ------------------------------------------------------- | ------------------- | -------------------------------- | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#schemaresultlistdepth) | ### Response Data Structure ## GET Query K-Line GET /api/v2/public/quote/getKline ### Request Parameters | Name | Type | Required | Description | | ----------------------------- | ------- | -------- | ------------------------------------------------------------------------------------------ | | contractId | string | No | Contract ID | | priceType | string | No | Price type | | klineType | string | No | K-line type | | size | integer | No | Number to retrieve. Must be greater than 0 and less than or equal to 1000. Default is 1000 | | offsetData | string | No | Pagination offset. If empty, get the first page | | filterBeginKlineTimeInclusive | string | No | Query start time (if 0, means from current time). Returns in descending order by time | | filterEndKlineTimeExclusive | string | No | Query end time | > Request Example ``` https://edgex-prod-v2.edgex.exchange/api/v2/public/quote/getKline?contractId=10000002&klineType=HOUR_1&filterBeginKlineTimeInclusive=1733416860000&filterEndKlineTimeExclusive=1734601200000&priceType=LAST_PRICE ``` > Response Example > 200 Response ```json { "code": "SUCCESS", "data": { "dataList": [ { "klineId": "687194918450962784", "contractId": "10000002", "contractName": "ETHUSDT", "klineType": "HOUR_1", "klineTime": "1734595200000", "priceType": "LAST_PRICE", "trades": "3142", "size": "111.96", "value": "412199.6286", "high": "3694.59", "low": "3667.42", "open": "3694.57", "close": "3670.42", "makerBuySize": "52.21", "makerBuyValue": "192147.4907" } ], "nextPageOffsetData": "" }, "msg": null, "errorParam": null, "requestTime": "1734601267556", "responseTime": "1734601267581", "traceId": "72cfd2eeb27fc602aa64990ad84cd8dd" } ``` ### Response | Status Code | Status Code Meaning | Description | Data Model | | ----------- | ------------------------------------------------------- | ------------------- | ------------------------------------ | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#schemaresultpagedatakline) | ## GET Query Multi-Contract Quantitative K-Line GET /api/v2/public/quote/getMultiContractKline ### Request Parameters | Name | Type | Required | Description | | ----------------------------- | ------- | -------- | ---------------------------------------------------------------------------------------- | | contractIdList | array | No | Collection of Contract IDs | | priceType | string | No | Price type | | klineType | string | No | K-line type | | size | integer | No | Number to retrieve. Must be greater than 0 and less than or equal to 200. Default is 200 | | filterBeginKlineTimeInclusive | string | No | Query start time (if 0, means from current time). Returns in descending order by time | | filterEndKlineTimeExclusive | string | No | Query end time | > Request Example ``` https://edgex-prod-v2.edgex.exchange/api/v2/public/quote/getMultiContractKline?contractIdList=10000001&klineType=HOUR_1&filterBeginKlineTimeInclusive=1733416860000&filterEndKlineTimeExclusive=1734601200000&priceType=LAST_PRICE ``` > Response Example > 200 Response ```json { "code": "SUCCESS", "data": [ { "contractId": "10000001", "klineList": [ { "klineId": "687194849731486048", "contractId": "10000001", "contractName": "BTCUSDT", "klineType": "HOUR_1", "klineTime": "1734595200000", "priceType": "LAST_PRICE", "trades": "3123", "size": "7.947", "value": "807240.1268", "high": "101798.4", "low": "101326.3", "open": "101603.8", "close": "101605.6", "makerBuySize": "5.222", "makerBuyValue": "530431.6634" } ] } ], "msg": null, "errorParam": null, "requestTime": "1734601896988", "responseTime": "1734601897009", "traceId": "7edd9609a0c5976c1cb58bdee3d08088" } ``` ### Response | Status Code | Status Code Meaning | Description | Data Model | | ----------- | ------------------------------------------------------- | ------------------- | ---------------------------------------- | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#schemaresultlistcontractkline) | ## GET Query 24-Hour Ticker GET /api/v2/public/quote/getTicker ### Request Parameters | Name | Type | Required | Description | | ---------- | ------ | -------- | ----------- | | contractId | string | No | Contract ID | > Response Example > 200 Response ```json { "code": "SUCCESS", "data": [ { "contractId": "10000001", "contractName": "BTCUSDT", "priceChange": "-2270.5", "priceChangePercent": "-0.021849", "trades": "79372", "size": "499.487", "value": "50821443.7464", "high": "105331.5", "low": "98755.0", "open": "103913.2", "close": "101642.7", "highTime": "1734524115631", "lowTime": "1734575388228", "startTime": "1734510600000", "endTime": "1734597000000", "lastPrice": "101642.7", "indexPrice": "101676.380723500", "oraclePrice": "101636.3750002346932888031005859375", "markPrice": "101636.3750002346932888031005859375", "openInterest": "0.105", "fundingRate": "-0.00012236", "fundingTime": "1734595200000", "nextFundingTime": "1734609600000" } ], "msg": null, "errorParam": null, "requestTime": "1734597508246", "responseTime": "1734597508250", "traceId": "a49014b0ad76a121193d4717294f85fc" } ``` ### Response | Status Code | Status Code Meaning | Description | Data Model | | ----------- | ------------------------------------------------------- | ------------------- | --------------------------------- | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#schemaresultlistticker) | ## GET Get Market Status GET /api/v2/public/quote/getMarketStatus Get stocks market status and limit price information. ### Request Parameters | Name | Type | Required | Description | | ---------- | ------- | -------- | ---------------------------------------------------------------------------- | | contractId | integer | No | Contract ID; when specified, returns status and limit price for the contract | > Response Example > 200 Response ```json { "code": "SUCCESS", "data": { "status": true, "force": false, "contractId": 10000001, "markPrice": "101642.7", "limitLowPrice": "91478.43", "limitHighPrice": "111806.97" }, "msg": null, "errorParam": null, "requestTime": "1734597508246", "responseTime": "1734597508250", "traceId": "a49014b0ad76a121193d4717294f85fc" } ``` ### Response | Status Code | Status Code Meaning | Description | Data Model | | ----------- | ------------------------------------------------------- | ------------------- | ------------------------------- | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#getmarketstatusmodel) | ## Data Model Notes * The models below are grouped by endpoint so you can find the payload shape quickly. * For onboarding, focus first on `DepthPayload`, `KlineRecord`, `TickerRecord`, and `GetMarketStatusPayload`. * If you only need a single widget or chart, you usually do not need every model on this page. ## Data Models ### DepthResult | Name | Type | Description | | ------------ | ------------------------ | ---------------------------------------------------------------------------------- | | code | string | Status code. `SUCCESS` means the request succeeded; other values indicate failure. | | data | \[[Depth](#schemadepth)] | Order-book depth payload returned by the server. | | errorParam | object | Structured error details returned by the server. | | requestTime | string(timestamp) | Timestamp when the server received the request. | | responseTime | string(timestamp) | Timestamp when the server returned the response. | | traceId | string | Call trace ID | ### DepthPayload | Name | Type | Description | | ------------ | -------------------------------- | ------------------------------- | | startVersion | string(int64) | Start order book version number | | endVersion | string(int64) | End order book version number | | level | integer(int32) | Depth level | | contractId | string(int64) | Contract ID | | contractName | string | Contract name | | asks | \[[BookOrder](#schemabookorder)] | Ask list | | bids | \[[BookOrder](#schemabookorder)] | Bid list | | depthType | string | Depth type | #### Enum Values | Property | Value | | --------- | -------------------- | | depthType | UNKNOWN\_DEPTH\_TYPE | | depthType | SNAPSHOT | | depthType | CHANGED | | depthType | UNRECOGNIZED | ### BookOrder | Name | Type | Description | | ----- | --------------- | ----------- | | price | string(decimal) | Price | | size | string(decimal) | Quantity | ### KlinePageResult | Name | Type | Description | | ------------ | ------------------------------------- | ---------------------------------------------------------------------------------- | | code | string | Status code. `SUCCESS` means the request succeeded; other values indicate failure. | | data | [PageDataKline](#schemapagedatakline) | Paginated K-line data. | | errorParam | object | Structured error details returned by the server. | | requestTime | string(timestamp) | Timestamp when the server received the request. | | responseTime | string(timestamp) | Timestamp when the server returned the response. | | traceId | string | Call trace ID | ### KlinePage | Name | Type | Description | | ------------------ | ------------------------ | ----------------------------------------------------------------- | | dataList | \[[Kline](#schemakline)] | K-line records for the current page. | | nextPageOffsetData | string | Offset token for the next page. Empty when there is no next page. | ### KlineRecord | Name | Type | Description | | ------------- | --------------- | ------------------------ | | klineId | string(int64) | K-Line ID | | contractId | string(int64) | Perpetual contract ID | | contractName | string | Perpetual contract name | | klineType | string | K-Line type | | klineTime | string(int64) | K-Line time | | priceType | string | Price type of the K-line | | trades | string(int64) | Number of trades | | size | string(decimal) | Volume | | value | string(decimal) | Value | | high | string(decimal) | High price | | low | string(decimal) | Low price | | open | string(decimal) | Opening price | | close | string(decimal) | Closing price | | makerBuySize | string(decimal) | Maker buy volume | | makerBuyValue | string(decimal) | Maker buy value | #### Enum Values | Property | Value | | --------- | -------------------- | | klineType | UNKNOWN\_KLINE\_TYPE | | klineType | MINUTE\_1 | | klineType | MINUTE\_5 | | klineType | MINUTE\_15 | | klineType | MINUTE\_30 | | klineType | HOUR\_1 | | klineType | HOUR\_2 | | klineType | HOUR\_4 | | klineType | HOUR\_6 | | klineType | HOUR\_8 | | klineType | HOUR\_12 | | klineType | DAY\_1 | | klineType | WEEK\_1 | | klineType | MONTH\_1 | | klineType | UNRECOGNIZED | | priceType | UNKNOWN\_PRICE\_TYPE | | priceType | ORACLE\_PRICE | | priceType | INDEX\_PRICE | | priceType | LAST\_PRICE | | priceType | ASK1\_PRICE | | priceType | BID1\_PRICE | | priceType | OPEN\_INTEREST | | priceType | UNRECOGNIZED | ### ContractMultiKlineResult | Name | Type | Description | | ------------ | -------------------------------------------------- | ---------------------------------------------------------------------------------- | | code | string | Status code. `SUCCESS` means the requ
프로젝트로 돌아가기