Repository Public
1{2 "$schema": "https://json-schema.org/draft/2020-12/schema",3 "$id": "https://sp-wallet.local/schema/signal-input-v2.schema.json",4 "title": "Input of python -m spq.signal --contract 2 (perpetual-futures strategy)",5 "description": "The version-1 input (signal-input.schema.json) plus funding, and optionally mark and index, for the perpetuals of the universe. Nothing dated after the last candle's bar-open time may be present: such a value does not exist yet at the decision and the runner refuses the input.",6 "type": "object",7 "required": [8 "candles",9 "funding"10 ],11 "properties": {12 "candles": {13 "type": "object",14 "description": "exactly the symbols of META['universe'] (spot legs '<SYMBOL>.SPOT' included); closed bars, oldest first, [ts, open, high, low, close, volume]",15 "minProperties": 1,16 "additionalProperties": {17 "type": "array",18 "minItems": 1,19 "items": {20 "type": "array",21 "prefixItems": [22 {23 "type": [24 "string",25 "number"26 ],27 "description": "bar-open time: ISO 8601 UTC or epoch seconds"28 },29 {30 "type": "number"31 },32 {33 "type": "number"34 },35 {36 "type": "number"37 },38 {39 "type": "number"40 },41 {42 "type": "number"43 }44 ],45 "minItems": 6,46 "maxItems": 647 }48 }49 },50 "funding": {51 "type": "object",52 "description": "exactly the perpetuals of META['universe']; hourly settlements, oldest first: [ts, rate] or [ts, rate, premium]. ts = settlement time (within 60 s of the hour), rate = fraction of notional that longs paid at that settlement (negative: shorts paid). A settlement is attached to the bar that opens at its hour.",53 "minProperties": 1,54 "additionalProperties": {55 "type": "array",56 "minItems": 1,57 "items": {58 "type": "array",59 "prefixItems": [60 {61 "type": [62 "string",63 "number"64 ]65 },66 {67 "type": "number"68 },69 {70 "type": "number"71 }72 ],73 "minItems": 2,74 "maxItems": 375 }76 }77 },78 "mark": {79 "$ref": "#/$defs/price_series",80 "description": "optional, perpetuals only: [ts, mark price] on bar-open times of the candles"81 },82 "index": {83 "$ref": "#/$defs/price_series",84 "description": "optional, perpetuals only: [ts, index / oracle price] on bar-open times of the candles"85 },86 "as_of": {87 "type": "string",88 "format": "date-time",89 "description": "optional; must equal the bar-open time of the last bar supplied"90 },91 "interval": {92 "type": "string",93 "description": "optional; must equal META['interval']"94 }95 },96 "additionalProperties": false,97 "$defs": {98 "price_series": {99 "type": "object",100 "minProperties": 1,101 "additionalProperties": {102 "type": "array",103 "minItems": 1,104 "items": {105 "type": "array",106 "prefixItems": [107 {108 "type": [109 "string",110 "number"111 ]112 },113 {114 "type": "number",115 "exclusiveMinimum": 0116 }117 ],118 "minItems": 2,119 "maxItems": 2120 }121 }122 }123 }124}125