livinginformation / merkato

Open-source cryptocurrency market making bot
GNU General Public License v3.0
14 stars 6 forks source link

Create a mock exchange for testing without putting funds at risk #76

Closed livinginformation closed 6 years ago

livinginformation commented 6 years ago

For testing purposes, we'll want a mock exchange that can build an orderbook and execute orders.

Don't prioritize until after beta.

nasaWelder commented 6 years ago

GUI needs this sooner rather than later so I can test how the data is ingested by the graph. This will also force us to "normalize" the formats/data-stuctures returned between exchanges so the GUI can expect the same data structure every time.

nasaWelder commented 6 years ago

In fact, i think GUI is dependent on this. I can't reasonable test the interface with live money.

livinginformation commented 6 years ago

Ah, of course. Okay, we'll make this a requirement for beta then.

livinginformation commented 6 years ago

Alright, I'm going to settle into working on this for a couple hours. Need to nail down a sane structure. If anyone is around to talk high-level stuff, I'll be on Discord.

livinginformation commented 6 years ago

https://docs.google.com/document/d/1X0yDzu2xl3lEZh1SOIQSs7ey9NRHh5s5ZdRMjZvsBLY/edit?usp=sharing will contain a live view into the working specification, going to put anything that comes to mind there.

nasaWelder commented 6 years ago

I had started an attempt a few weeks ago. Basically a copy paste of a tux exchange object with added machinery for generating new price, checking that against self order book. You'd just need to replace _buy _sell and generate some of the data asked for in some of the other methods. Also see Graph.fake_data() in simple app for a very dumb version. That is at the merkato level though, so too abstract

livinginformation commented 6 years ago

82 should take care of a chunk of this, we still need to hook the interface up to use the mock exchange (create signed request will need to actually talk to the orderbook)

nasaWelder commented 6 years ago

Nothing external calls signed request, I don't think we're simulating failed API calls, unless you wanna go full real life sim

livinginformation commented 6 years ago

[Project scope intensifies]

livinginformation commented 6 years ago

Yeah, lets keep it as lightweight as possible, we can nuke signed requests and stuff.

nasaWelder commented 6 years ago

I'll eventually bolt on a price determination override to be able to back test bots of different parameters against same price action. Like a list of price/time tuples arg

livinginformation commented 6 years ago

Ive been thinking the same thing (passing in time-series data of price over a span, and calculating the expected profit).

Ill add it as its own issue.

mark-antony1 commented 6 years ago

is this complete @livinginformation @nasaWelder

livinginformation commented 6 years ago

Looks like it