The rest API of okex is too restricted in frequency, so try to get deep information with dial websocket connection; Since the number of simultaneous subscriptions (about 80) is relatively large, the time required for logical processes, ordering, and querying is very limited. This results in a slightly larger execution interval for the ws.read function and an over-accumulation of data, so that each round of read and deep maintenance takes a relatively long time, with no high efficiency rest api; Think about whether there could be a separate program that would only be responsible for rounding up the websocket information, maintaining the depth, and forwarding the updated depth information to the bot at any time via the local port.
Inventors quantify - small dreamsWhat's up? Think about whether there could be a separate program that would only be responsible for rounding up the websocket information, maintaining the depth, and forwarding the updated depth information to the bot at any time via the local port. What's up? This requirement can be met. It is possible to write an industry collector, a data center disk, and open a service to distribute data. The Dial function is in the non-blocking instant return mode.
churchillxyI'm also faced with this need, planning to buy and sell with websocket, rest, is that reasonable? If it's not reasonable, trouble pointing out; if it's reasonable, what is the code framework implemented?