PolychartService
Get Market Layers
Retrieve enabled drawing layers and drawings for a market, scoped to caller subscriptions.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/polychart/markets/1/layers' \ --header 'Accept: */*' \ --header 'X-API-KEY-ID: YOUR_API_KEY_ID' \ --header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \ --header 'X-API-SIGNATURE: YOUR_API_SIGNATURE'
Responses
{
"drawings": [
{
"bboxPriceMax": 61000.25,
"bboxPriceMin": 61000.25,
"bboxTimeMaxMs": "1",
"bboxTimeMinMs": "1",
"clientUpdatedAtMs": "1",
"deletedAtMs": "1",
"drawingId": "1",
"engineSymbolId": 1,
"layer": {
"layerId": "1",
"ownerId": "1"
},
"ownerId": "1",
"payload": "AA==",
"type": 1,
"updatedAtMs": "1",
"version": 1
}
],
"engineSymbolId": 1,
"layers": [
{
"colorRgba": 1,
"engineSymbolId": 1,
"isLocked": false,
"isVisible": false,
"layerId": "1",
"name": "BTC Support and Resistance",
"ownerId": "1",
"revision": "1",
"sortHint": 1,
"updatedAtMs": "1",
"useLayerColor": false
}
],
"subscriptions": [
{
"aliasName": "BTC Bias Line",
"engineSymbolId": 1,
"isEnabled": false,
"isLockedOverride": false,
"isPinned": false,
"isVisibleOverride": false,
"layer": {
"layerId": "1",
"ownerId": "1"
},
"sortOrder": 1,
"viewerId": "1"
}
]
}Engine symbol identifier for the market to load.
Engine symbol identifier for the returned market.
1Viewer account that owns this subscription.
1Engine symbol identifier for the subscription market.
1Account that owns the layer.
1Layer identifier unique within the owner account.
1Optional viewer-specific display name for the layer.
BTC Bias LineViewer-defined ordering value for subscribed layers.
1True when drawings from this layer should be loaded by default.
falseTrue when the layer should stay pinned in the viewer's layer list.
falseViewer overrides (optional). Visibility override for this viewer; unset means use the layer default.
falseLocked-state override for this viewer; unset means use the layer default.
falseAccount that owns the layer.
1Layer identifier unique within the owner account.
1Engine symbol identifier for the market this layer belongs to.
1Human-readable layer name.
BTC Support and ResistanceOwner-defined ordering hint for the layer list.
1Owner-level style defaults. Packed layer color in 0xAARRGGBB format.
1True when drawings should use the layer color by default.
falseTrue when clients should prevent editing drawings in this layer.
falseTrue when the layer is visible by default.
falseMonotonic per layer; increments on any committed change to the layer or its drawings.
1Server-assigned commit timestamp in milliseconds since epoch (UTC).
1Account that owns the drawing.
1Drawing identifier unique within the owner account.
1Account that owns the layer.
1Layer identifier unique within the owner account.
1Engine symbol identifier for the drawing market.
1Client-defined drawing type identifier.
1Client-defined payload schema version.
1Serialized drawing payload bytes.
AA==Minimum drawing time bound in milliseconds since epoch (UTC); 0 means unset.
1Maximum drawing time bound in milliseconds since epoch (UTC); 0 means unset.
1Minimum drawing price bound; 0 means unset.
61000.25Maximum drawing price bound; 0 means unset.
61000.25Server-assigned commit timestamp in milliseconds since epoch (UTC).
1Server-assigned deletion timestamp in milliseconds since epoch (UTC); 0 means not deleted.
1Client-assigned commit timestamp in milliseconds since epoch (UTC), used for last-write-wins merge.
1| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |