-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Github Workflow
committed
Nov 8, 2024
1 parent
616070b
commit 26bde89
Showing
4 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"ticks_batch": 1, | ||
"market": "forex", | ||
"subscribe": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Ticks Batch Stream (response)", | ||
"description": "Latest spot price for a group symbols. Continuous responses with a frequency of up to one second.", | ||
"type": "object", | ||
"required": [ | ||
"echo_req", | ||
"msg_type" | ||
], | ||
"properties": { | ||
"ticks_batch": { | ||
"title": "ticks_batch", | ||
"description": "Tick by tick list of streamed data for a group of symbols", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"ask", | ||
"bid", | ||
"change", | ||
"epoch", | ||
"quote", | ||
"symbol" | ||
], | ||
"properties": { | ||
"ask": { | ||
"description": "Market ask at the epoch", | ||
"type": "string" | ||
}, | ||
"bid": { | ||
"description": "Market bid at the epoch", | ||
"type": "string" | ||
}, | ||
"change": { | ||
"description": "Daily percentage change", | ||
"type": "string" | ||
}, | ||
"epoch": { | ||
"description": "Epoch time of the tick", | ||
"type": "integer" | ||
}, | ||
"quote": { | ||
"description": "Market value at the epoch", | ||
"type": "string" | ||
}, | ||
"symbol": { | ||
"description": "Symbol", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"subscription": { | ||
"title": "Subscription information", | ||
"description": "For subscription requests only.", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"id" | ||
], | ||
"properties": { | ||
"id": { | ||
"description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", | ||
"type": "string", | ||
"examples": [ | ||
"c84a793b-8a87-7999-ce10-9b22f7ceead3" | ||
] | ||
} | ||
} | ||
}, | ||
"echo_req": { | ||
"description": "Echo of the request made.", | ||
"type": "object" | ||
}, | ||
"msg_type": { | ||
"description": "Action name of the request made.", | ||
"type": "string", | ||
"enum": [ | ||
"ticks_batch" | ||
] | ||
}, | ||
"req_id": { | ||
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.", | ||
"type": "integer" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Ticks Batch Stream (request)", | ||
"description": "Initiate a continuous stream of spot price updates for a group symbols.", | ||
"type": "object", | ||
"auth_required": 0, | ||
"additionalProperties": false, | ||
"required": [ | ||
"ticks_batch", | ||
"market" | ||
], | ||
"properties": { | ||
"ticks_batch": { | ||
"description": "Must be `1`", | ||
"type": "integer", | ||
"enum": [ | ||
1 | ||
] | ||
}, | ||
"market": { | ||
"description": "The short market name.", | ||
"type": "string", | ||
"enum": [ | ||
"forex", | ||
"indices", | ||
"commodities", | ||
"stocks", | ||
"cryptocurrency", | ||
"synthetic_index" | ||
] | ||
}, | ||
"subscribe": { | ||
"description": "[Optional] If set to 1, will send updates in batches by market.", | ||
"type": "integer", | ||
"enum": [ | ||
1 | ||
] | ||
}, | ||
"passthrough": { | ||
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", | ||
"type": "object" | ||
}, | ||
"req_id": { | ||
"description": "[Optional] Used to map request to response.", | ||
"type": "integer" | ||
} | ||
} | ||
} |