Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Write trades into a sql database #194

@nikhilsaraf

Description

@nikhilsaraf

Follow-up issues: #317 and #318

Desired Behavior

I want to be able to access all the trades executed by the bot in a database

Impact

The desired behavior will allow me to better work with kelp trades

Feature Suggestion

We can achieve the desired behavior by writing to the database as a fill tracking handler

References

depends on this bug: #193

Tasks

  • port commits:
  • switch to a better db driver that can cross-compile, such as a postgres driver
  • save asset issuers in db table (or foreign key to a markets table)
  • use date types on date fields
  • fix schema for trades table
  • correct number of decimals for precision of float values
  • composite primary key on trades table (market_id and txid)
  • should provide a graceful failure mode experience when using without an installed postgres db, or one we cannot connect to
  • add version number to the database and version numbers per table to know when they are upgraded (maybe in the same table with a column specifying table vs. db)

Testing

  • test compiles and runs on local machine for local platform (OS, arch)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions