aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts')
-rw-r--r--packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts b/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts
new file mode 100644
index 000000000..cfc0ddc8f
--- /dev/null
+++ b/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts
@@ -0,0 +1,21 @@
+export const relayerApiOrderbookChannelSnapshotSchema = {
+ id: '/RelayerApiOrderbookChannelSnapshot',
+ type: 'object',
+ properties: {
+ type: {enum: ['snapshot']},
+ channel: {enum: ['orderbook']},
+ channelId: {type: 'number'},
+ payload: {$ref: '/RelayerApiOrderbookChannelSnapshotPayload'},
+ },
+ required: ['type', 'channel', 'channelId', 'payload'],
+};
+
+export const relayerApiOrderbookChannelSnapshotPayload = {
+ id: '/RelayerApiOrderbookChannelSnapshotPayload',
+ type: 'object',
+ properties: {
+ bids: {$ref: '/signedOrdersSchema'},
+ asks: {$ref: '/signedOrdersSchema'},
+ },
+ required: ['bids', 'asks'],
+};