list
* [ ] Replace StarkEx signature code with EIP-712 implementation
* [ ] Update signature format from `{r, s}` to `0x...` hex string
* [ ] Use standard Ethereum private keys (not StarkEx keys)
* [ ] Update amount calculations (check if resolutions changed)
* [ ] Test with V2 testnet before production
***
## Security Best Practices
1. **Protect Your Signer Key**
* Store encrypted (e.g., AWS KMS, HashiCorp Vault)
* Never log or expose in error messages
* Rotate periodically
2. **Validate All Inputs**
* Check amounts are within valid ranges
* Verify addresses are valid Ethereum addresses
* Ensure nonce is unique
3. **Use Official SDK**
* Let SDK handle signature generation
* Reduces risk of implementation bugs
* Automatically stays updated
4. **Monitor Signature Usage**
* Track orders signed by your key
* Alert on unusual patterns
* Implement rate limiting
***
## Additional Resources
* **EIP-712 Specification**: <https://eips.ethereum.org/EIPS/eip-712>
* **Go-Ethereum EIP-712 Implementation**: <https://pkg.go.dev/github.com/ethereum/go-ethereum/signer/core/apitypes>
* **EdgeX Python SDK**: <https://github.com/edgex-Tech/edgex-python-sdk>
* **EdgeX Golang SDK**: <https://github.com/edgex-Tech/edgex-golang-sdk>
* **EdgeX API Documentation**: <https://edgex-1.gitbook.io/edgeX-documentation>
# Public API
Public APIs provide access to market data and platform information without requiring authentication.
## Available Services
### [Metadata API](/edgeX-documentation/api-v2/public-api/metadata-api)
Retrieve platform configuration and reference data:
* **Get Server Time** - Current server timestamp
* **Get Metadata** - Global configuration including:
* Coin list (supported assets)
* Contract list (available perpetual contracts)
* Multi-chain configuration
* System parameters
### [Quote API](/edgeX-documentation/api-v2/public-api/quote-api)
Access real-time and historical market data:
* **Get Depth** - Order book depth (buy/sell orders)
* **Get K-line** - Historical K-line (candlestick) data
* **Get Ticker** - 24-hour market statistics
* **Get Multi-Contract K-line** - K-line data for multiple contracts
* **Get Market Status** - Market open/close status (for stocks)
### [Funding Rate API](/edgeX-documentation/api-v2/public-api/funding-api)
Query funding rate information:
* **Get Latest Funding Rate** - Current funding rate by contract
* **Get Funding Rate Page** - Historical funding rates (paginated)
## Key Features
* **No Authentication Required** - All public endpoints are accessible without API keys
* **Rate Limits Apply** - Fair usage policies ensure service availability for all users
* **Real-Time Data** - Market data is updated in real-time
* **Historical Data** - Access to historical market information
## Usage Example
```bash
## Minimal Public Calls
### Get server time
curl -X GET "https://<api-domain>/api/v2/public/meta/getServerTime"
### Get market depth for BTC contract
curl -X GET "https://<api-domain>/api/v2/public/quote/getDepth?contractId=10000001&level=15"
### Get latest funding rate
curl -X GET "https://<api-domain>/api/v2/public/funding/getLatestFundingRate?contractId=10000001"
```
## Response Format
All public API responses follow the standard format:
```json
{
"code": "SUCCESS",
"data": { ... },
"msg": null,
"errorParam": null,
"requestTime": "1234567890123",
"responseTime": "1234567890124",
"traceId": "abc123..."
}
```
## Base URL
* **HTTP REST base URL**: `https://<api-domain>`
Replace `<api-domain>` with the production HTTP API domain provided by EdgeX. Internal or non-production domains are not included in this public documentation.
## Best Practices
1. **Cache Metadata** - Metadata changes infrequently; cache locally to reduce requests
2. **Use Appropriate Depth Levels** - Request only the depth level you need (15 or 200)
3. **Respect Rate Limits** - Implement exponential backoff for retries
4. **Handle Errors Gracefully** - Check `code` field in responses
## Navigation
* [← Back to API V2 Documentation](/edgeX-documentation/api-v2)
* [Metadata API →](/edgeX-documentation/api-v2/public-api/metadata-api)
* [Quote API →](/edgeX-documentation/api-v2/public-api/quote-api)
* [Funding Rate API →](/edgeX-documentation/api-v2/public-api/funding-api)
# Metadata API
**Field naming note**: This metadata response still contains several historical `starkEx*` field names returned by the backend. Keep those field names unchanged when parsing API responses; in V2 documentation they should be read as legacy response names, not as a recommendation to use the old V1 signing model.
## When to Use This Page
Read this page first when integrating EdgeX V2. Metadata endpoints provide the contract catalog, coin metadata, precision, risk tiers, and global configuration required before placing orders or building a trading UI.
## Minimal Calls
Get server time:
```bash
curl -X GET "https://<api-domain>/api/v2/public/meta/getServerTime"
```
Get full platform metadata:
```bash
curl -X GET "https://<api-domain>/api/v2/public/meta/getMetaData"
```
## Common Notes
* Call metadata endpoints before building order-entry logic so you can load contract precision, fee-related metadata, and global config.
* Treat `starkEx*` fields as legacy response names from the backend; do not rename them in your parser.
* If SDK behavior and old wording conflict, trust the live response payload and current SDK behavior.
## GET Server Time
GET /api/v2/public/meta/getServerTime
> Example Response
> 200 Response
```json
{
"code": "SUCCESS",
"data": {
"timeMillis": "1734596189305"
},
"msg": null,
"errorParam": null,
"requestTime": "1734596189305",
"responseTime": "1734596189305",
"traceId": "a69e6ec51701d7246cb344a719c99cbf"
}
```
### Response Body
| Status Code | Status Code Description | Description | Data Model |
| ----------- | ------------------------------------------------------- | ------------------- | ------------------------ |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#getservertime) |
## GET Meta Data
GET /api/v2/public/meta/getMetaData
> Example Response
> 200 Response
```json
{
"code": "SUCCESS",
"data": {
"global": {
"appName": "edgeX",
"appEnv": "testnet",
"appOnlySignOn": "https://<api-domain>",
"feeAccountId": "123456",
"feeAccountL2Key": "0x1e240",
"poolAccountId": "542076087396467085",
"poolAccountL2Key": "0x3bf794b4433e0a8b353da361bb7284c670914d27ed04698e6abed0bf1198028",
"fastWithdrawAccountId": "542076087396467085",
"fastWithdrawAccountL2Key": "0x3bf794b4433e0a8b353da361bb7284c670914d27ed04698e6abed0bf1198028",
"fastWithdrawMaxAmount": "100000",
"fastWithdrawRegistryAddress": "0xb2846943C2EdA3830Fb784d2a6de93435267b11D",
"starkExChainId": "0xaa36a7",
"starkExContractAddress": "0xa3Cb2622C532e46c4376FAd4AbFDf9eDC717BABf",
"starkExCollateralCoin": {
"coinId": "1000",
"coinName": "USDT",
"stepSize": "0.000001",
"showStepSize": "0.0001",
"iconUrl": "https://static.edgex.exchange/icons/coin/USDT.svg",
"starkExAssetId": "0x33bda5c923bae4e84825b74762d5482889b9512465fbffc50d1ae4b82e345c3",
"starkExResolution": "0xf4240"
},
"starkExMaxFundingRate": 1120,
"starkExOrdersTreeHeight": 64,
"starkExPositionsTreeHeight": 64,
"starkExFundingValidityPeriod": 604800,
"starkExPriceValidityPeriod": 31536000,
"maintenanceReason": ""
},
"coinList": [
{
"coinId": "1000",
"coinName": "USDT",
"stepSize": "0.000001",
"showStepSize": "0.0001",
"iconUrl": "https://static.edgex.exchange/icons/coin/USDT.svg",
"starkExAssetId": "0x33bda5c923bae4e84825b74762d5482889b9512465fbffc50d1ae4b82e345c3",
"starkExResolution": "0xf4240"
},
{
"coinId": "1001",
"coinName": "BTC",
"stepSize": "0.001",
"showStepSize": "0.001",
"iconUrl": "https://static.edgex.exchange/icons/coin/BTC.svg",
"starkExAssetId": null,
"starkExResolution": null
}
],
"contractList": [
{
"contractId": "10000001",
"contractName": "BTCUSDT",
"baseCoinId": "1001",
"quoteCoinId": "1000",
"tickSize": "0.1",
"stepSize": "0.001",
"minOrderSize": "0.001",
"maxOrderSize": "50.000",
"maxOrderBuyPriceRatio": "0.05",
"minOrderSellPriceRatio": "0.05",
"maxPositionSize": "60.000",
"riskTierList": [
{
"tier": 1,
"positionValueUpperBound": "50000",
"maxLeverage": "100",
"maintenanceMarginRate": "0.005",
"starkExRisk": "21474837",
"starkExUpperBound": "214748364800000000000"
},
{
"tier": 22,
"positionValueUpperBound": "79228162514264337593543",
"maxLeverage": "6",
"maintenanceMarginRate": "0.105",
"starkExRisk": "450971567",
"starkExUpperBound": "340282366920938463463374607431768211455"
}
],
"defaultTakerFeeRate": "0.00055",
"defaultMakerFeeRate": "0.0002",
"defaultLeverage": "50",
"liquidateFeeRate": "0.01",
"enableTrade": true,
"enableDisplay": true,
"enableOpenPosition": true,
"fundingInterestRate": "0.0003",
"fundingImpactMarginNotional": "10",
"fundingMaxRate": "0.000234",
"fundingMinRate": "-0.000234",
"fundingRateIntervalMin": "240",
"displayDigitMerge": "0.1,0.5,1,2,5",
"displayMaxLeverage": "50",
"displayMinLeverage": "1",
"displayNewIcon": false,
"displayHotIcon": true,
"matchServerName": "edgex-match-server",
"starkExSyntheticAssetId": "0x425443322d31300000000000000000",
"starkExResolution": "0x2540be400",
"starkExOraclePriceQuorum": "0x1",
"starkExOraclePriceSignedAssetId": [
"0x425443555344000000000000000000004d616b6572",
"0x425443555344000000000000000000005374437277",
"0x4254435553440000000000000000000053746f726b",
"0x425443555344000000000000000000004465787472",
"0x4254435553440000000000000000000053744b6169"
],
"starkExOraclePriceSigner": [
"0x28253746dcd68a62df58cda44db2613ab11c8d17deb036feaec5ece1f8a16c1",
"0x41dbe627aeab66504b837b3abd88ae2f58ba6d98ee7bbd7f226c4684d9e6225",
"0xcc85afe4ca87f9628370c432c447e569a01dc96d160015c8039959db8521c4",
"0x2af704df5467285c5d1bd7c08ee33c49057fb2a05ecdc4f949293190f28ce7e",
"0x63f0f8507cc674ff668985a1ea854d3b73835a8181bfbb4564ae422bf68a2c0"
]
},
{
"contractId": "10000002",
"contractName": "ETHUSDT",
"baseCoinId": "1002",
"quoteCoinId": "1000",
"tickSize": "0.01",
"stepSize": "0.01",
"minOrderSize": "0.01",
"maxOrderSize": "500.00",
"maxOrderBuyPriceRatio": "0.05",
"minOrderSellPriceRatio": "0.05",
"maxPositionSize": "800.00",
"riskTierList": [
{
"tier": 1,
"positionValueUpperBound": "50000",
"maxLeverage": "100",
"maintenanceMarginRate": "0.005",
"starkExRisk": "21474837",
"starkExUpperBound": "214748364800000000000"
},
{
"tier": 22,
"positionValueUpperBound": "79228162514264337593543",
"maxLeverage": "6",
"maintenanceMarginRate": "0.105",
"starkExRisk": "450971567",
"starkExUpperBound": "340282366920938463463374607431768211455"
}
],
"defaultTakerFeeRate": "0.00055",
"defaultMakerFeeRate": "0.0002",
"defaultLeverage": "50",
"liquidateFeeRate": "0.01",
"enableTrade": true,
"enableDisplay": true,
"enableOpenPosition": true,
"fundingInterestRate": "0.0003",
"fundingImpactMarginNotional": "100",
"fundingMaxRate": "0.000234",
"fundingMinRate": "-0.000234",
"fundingRateIntervalMin": "240",
"displayDigitMerge": "0.01,0.02,0.04,0.1,0.2",
"displayMaxLeverage": "50",
"displayMinLeverage": "1",
"displayNewIcon": true,
"displayHotIcon": false,
"matchServerName": "edgex-match-server",
"starkExSyntheticAssetId": "0x4554482d3900000000000000000000",
"starkExResolution": "0x3b9aca00",
"starkExOraclePriceQuorum": "0x1",
"starkExOraclePriceSignedAssetId": [
"0x455448555344000000000000000000004d616b6572",
"0x455448555344000000000000000000005374437277",
"0x4554485553440000000000000000000053746f726b",
"0x455448555344000000000000000000004465787472",
"0x4554485553440000000000000000000053744b6169"
],
"starkExOraclePriceSigner": [
"0x28253746dcd68a62df58cda44db2613ab11c8d17deb036feaec5ece1f8a16c1",
"0x41dbe627aeab66504b837b3abd88ae2f58ba6d98ee7bbd7f226c4684d9e6225",
"0xcc85afe4ca87f9628370c432c447e569a01dc96d160015c8039959db8521c4",
"0x2af704df5467285c5d1bd7c08ee33c49057fb2a05ecdc4f949293190f28ce7e",
"0x63f0f8507cc674ff668985a1ea854d3b73835a8181bfbb4564ae422bf68a2c0"
]
}
],
"multiChain": {
"coinId": "1000",
"maxWithdraw": "100000",
"minWithdraw": "0",
"minDeposit": "10",
"chainList": [
{
"chain": "Sepolia - Testnet",
"chainId": "11155111",
"chainIconUrl": "https://static.edgex.exchange/icons/chain/sepolia.svg",
"contractAddress": "0xC820e27D4821071129D4fB04CcD9ae8a370373bc",
"depositGasFeeLess": false,
"feeLess": false,
"feeRate": "0.0001",
"gasLess": false,
"gasToken": "ETH",
"minFee": "2",
"rpcUrl": "https://rpc.edgex.exchange/RMZZpeTnB6hjfcm8xNNyo6cKa9Zn4qgB/eth-sepolia",
"webTxUrl": "https://sepolia.etherscan.io/tx/",
"withdrawGasFeeLess": false,
"tokenList": [
{
"tokenAddress": "0xd98B590ebE0a3eD8C144170bA4122D402182976f",
"decimals": "6",
"iconUrl": "https://static.edgex.exchange/icons/coin/USDT.svg",
"token": "USDT",
"pullOff": false,
"withdrawEnable": true,
"useFixedRate": false,
"fixedRate": ""
}
],
"txConfirm": "10",
"blockTime": "12",
"allowAaDeposit": true,
"allowAaWithdraw": false,
"appRpcUrl": "https://rpc.edgex.exchange/GujYf2XWDvzXDpQdXno92DGRhfy7HuLK/eth-sepolia"
},
{
"chain": "BNB - Testnet",
"chainId": "97",
"chainIconUrl": "https://static.edgex.exchange/icons/chain/sepolia.svg",
"contractAddress": "0xBe8dCAE2b5E58BdEe4695F7f366fF0A8B0A414D1",
"depositGasFeeLess": false,
"feeLess": false,
"feeRate": "0.0001",
"gasLess": false,
"gasToken": "BSC",
"minFee": "2",
"rpcUrl": "https://rpc.edgex.exchange/RMZZpeTnB6hjfcm8xNNyo6cKa9Zn4qgB/bsc-testnet",
"webTxUrl": "https://testnet.bscscan.com/tx/",
"withdrawGasFeeLess": false,
"tokenList": [
{
"tokenAddress": "0xda6c748A7593826e410183F05893dbB363D025a1",
"decimals": "6",
"iconUrl": "https://static.edgex.exchange/icons/coin/USDT.svg",
"token": "USDT",
"pullOff": false,
"withdrawEnable": true,
"useFixedRate": false,
"fixedRate": ""
}
],
"txConfirm": "10",
"blockTime": "3",
"allowAaDeposit": false,
"allowAaWithdraw": false,
"appRpcUrl": "https://rpc.edgex.exchange/GujYf2XWDvzXDpQdXno92DGRhfy7HuLK/bsc-testnet"
},
{
"chain": "Arbitrum - Testnet",
"chainId": "421614",
"chainIconUrl": "https://static.edgex.exchange/icons/chain/sepolia.svg",
"contractAddress": "0xeeA926DB072E839063321776ddAdaddeECdF9718",
"depositGasFeeLess": false,
"feeLess": false,
"feeRate": "0.0001",
"gasLess": false,
"gasToken": "ETH",
"minFee": "2",
"rpcUrl": "https://rpc.edgex.exchange/RMZZpeTnB6hjfcm8xNNyo6cKa9Zn4qgB/arbitrum-sepolia",
"webTxUrl": "https://sepolia.arbiscan.io/tx/",
"withdrawGasFeeLess": false,
"tokenList": [
{
"tokenAddress": "0x608babb39bb03C038b8DABc3D4bF4e0D02d455Cd",
"decimals": "18",
"iconUrl": "https://static.edgex.exchange/icons/coin/USDT.svg",
"token": "USDT",
"pullOff": false,
"withdrawEnable": true,
"useFixedRate": false,
"fixedRate": ""
}
],
"txConfirm": "10",
"blockTime": "3",
"allowAaDeposit": true,
"allowAaWithdraw": true,
"appRpcUrl": "https://rpc.edgex.exchange/GujYf2XWDvzXDpQdXno92DGRhfy7HuLK/arbitrum-sepolia"
}
]
}
},
"msg": null,
"errorParam": null,
"requestTime": "1734595526342",
"responseTime": "1734595526343",
"traceId": "1ee9b62c30925f0df6bd6c8604f32df4"
}
```
### Response Body
| Status Code | Status Code Description | Description | Data Model |
| ----------- | ------------------------------------------------------- | ------------------- | ------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#MetadataResult) |
## Data Models
### MetadataResult
| Name | Type | Description |
| ------------ | --------------------------- | ------------------------------------------------------- |
| code | string | Status code. "SUCCESS" for success, others for failure. |
| data | [MetaData](#schemametadata) | Global metadata |
| 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 |
### MetadataPayload
| Name | Type | Description |
| ------------ | ------------------------------- | ------------------------------------ |
| global | [Global](#schemaglobal) | Global meta information |
| coinList | \[[Coin](#schemacoin)] | All coin meta information |
| contractList | \[[Contract](#schemacontract)] | All contract meta information |
| multiChain | [MultiChain](#schemamultichain) | Cross-chain withdrawal related class |
### MultiChainConfig
| Name | Type | Description |
| ----------- | ------------------------ | ----------------------------------- |
| coinId | string(int64) | Asset id for deposit and withdrawal |
| maxWithdraw | string | Maximum withdrawal amount |
| minWithdraw | string | Minimum withdrawal amount |
| minDeposit | string | Minimum deposit amount |
| chainList | \[[Chain](#schemachain)] | Supported chains |
### ChainConfig
| Name | Type | Description |
| ------------------ | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| chain | string | Main chain name |
| chainId | string(int64) | chainId |
| chainIconUrl | string | Main chain icon url |
| contractAddress | string | Contract address |
| depositGasFeeLess | boolean | Whether to charge deposit fee |
| feeLess | boolean | Whether to exempt from fees |
| feeRate | string | Fee rate |
| gasLess | boolean | Whether to charge gas fee |
| gasToken | string | Main chain token name |
| minFee | string | Minimum withdrawal fee. If gas + value\*fee\_rate is less than min\_fee, it will be charged according to min\_fee |
| rpcUrl | string | Online node service of the chain |
| webTxUrl | string | Transaction tx link |
| withdrawGasFeeLess | boolean | Whether to charge withdrawal fee |
| tokenList | \[[MultiChainToken](#schemamultichaintoken)] | Collection of cross-chain related token information |
| txConfirm | string(int64) | Number of confirmations for on-chain deposit |
| blockTime | string | Block time |
| appRpcUrl | string | none |
### MultiChainConfigtoken
| Name | Type | Description |
| -------------- | ------------- | --------------------------------------------------- |
| tokenAddress | string | Token contract address |
| decimals | string(int64) | Token precision |
| iconUrl | string | Token icon url |
| token | string | Token name |
| pullOff | boolean | Whether to delist, default is false |
| withdrawEnable | boolean | Whether to support withdrawal of this type of asset |
| useFixedRate | boolean | Whether to use a fixed exchange rate |
| fixedRate | string | Fixed exchange rate |
### ContractMetadata
| Name | Type | Description |
| ------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| contractId | string(int64) | Perpetual contract pair identifier |
| contractName | string | Perpetual contract pair name |
| baseCoinId | string(int64) | e.g., 10000001 (BTC) |
| quoteCoinId | string(int64) | e.g., 1001 (USD/USDT) |
| tickSize | string(decimal) | Minimum price increment (quoteCoinId) |
| stepSize | string(decimal) | Minimum quantity increment (baseCoinId) |
| minOrderSize | string(decimal) | Minimum order quantity (baseCoinId) |
| maxOrderSize | string(decimal) | Maximum order quantity (baseCoinId) |
| maxOrderBuyPriceRatio | string(decimal) | Maximum limit buy order price ratio (compared to oracle price), decimal (quote\_coin\_id) |
| minOrderSellPriceRatio | string(decimal) | Minimum limit sell order price ratio (compared to oracle price), decimal (quote\_coin\_id) |
| maxPositionSize | string(decimal) | Maximum position quantity (baseCoinId) |
| riskTierList | \[[RiskTier](#schemarisktier)] | List of risk limit tiers |
| default프로젝트로 돌아가기