status
field in the response section can be used to understand if the server recieved the information sent.false
for failed to process andtrue
for when action has been recieved correctly- Max Payload Size roughtly 5 mb, which may not be 1 mb of data. If fetch/subscription start request requires more than this, the server prioritizes sending the beginning but not the end of this data. if you are requiring this much data, split requests into time ranges and then send
- Client sends message with missing fields
{
"msg" : "getTickerInfo"
}
- Server responds with
{
"reason": "Bad Request : Bad ticker, 'ticker' may be missing",
"status": 0
}
- Client sends an unparsable json file
{
"crah",
}
- Server responds with
{
"reason": "Bad Request : Bad Json",
"status": 0,
"msg": "Any"
}
- Client A request to server
{
"msg" : "GetIndexTickers"
}
- Server Responds with
{
"status": 1,
"data": [
"CRRPT",
"SYS1CPT",
"EDGEFND"
],
"msg": "GetIndexTickers"
}
- Client Requst to server
{
"msg" : "getTickerInfo",
"ticker" : "SYS1CPT"
}
- Server Responds with
{
"status": 1,
"data": {
"name": "Systic 1 Capitol",
"seed": 34225,
"wander": 0.3
},
"msg": "getTickerInfo"
}
- Client Requst to server
{
"msg" : "fetch",
"ticker" : "CRRPT",
"start" :1670775776028 ,
"end" : 1670775817446,
"period" : 1000
}
- Server Responds with
{
"status": 1,
"data": {
"data" : [
{
"open": 195.8,
"high": 195.8,
"low": 93.97,
"close": 93.97,
"index": 1670775776500
},
],
"ticker" : "CRRPT",
"period" : 1000
},
"msg": "fetch"
}
- Client Requst to server
{
"msg" : "subscribe",
"ticker" : "CRRPT",
"start" :1670775776028,
"period" : 1000
}
- Server Responds with
{
"status": 1,
"data": {
"data" : [
{
"open": 236.6,
"high": 280.72,
"low": 190.82,
"close": 226.94,
"index": 1671326185500
}
],
"ticker" : "CRRPT",
"period" : 1000
},
"msg": "subscribe"
}
- Client Requst to server
{
"msg" : "unsubscribe",
"ticker" : "CRRPT",
"period" : 1000
}
- Server Responds with
{
"status": 1,
"data": {
"found": true
},
"msg": "unsubscribe"
}
Ticker
must be unique otherwise it will be overwrittenif
min
ormax
are defined then wander will be the distance between these 2 points with 0 being in the middleif not defined,
wander
will affect the high's and low's of the seed over timeif
name
not providedticker
will be substitiuted for all instances of namedescription --------------------------------------
name
a name
seed
a seed for random number generation
wander
a number from -1 to 1 that indicates violitility of the price
dateStart
null or a number in milliseconds or datetime indicating the first appearance on the index
dateEnd
null or a number indicating the time this ticker was removed from the index,
min
null or minimum value this stock can have
max
null or maximum value this stock can have
{...
"Ticker" : {
"name" : "WAS Corporation",
"seed" : 3425,
"wander" : 0.3,
"dateStart" : "2022-12-09T20:03:39.830Z",
"dateEnd" : "2022-12-09T20:03:39.830Z",
"min" : null,
"max" : null,
}
}