golang-crypto-trading-bot
golang-crypto-trading-bot copied to clipboard
Get Order status
The bot should be able to know order status (eg. if an order is still open or is closed)
How would this work? Would you implement functions like GetOrders(markets []Market) ([]UserOrder, error)
Should the following be tagged?
- trading type (spot, margin, p2p)
- order id (an id which can be used to update/cancel an order)
- buy/sell
- market Some of this data can be redundant depending on how the interface is implemented. If we want to be able to retrieve all orders for example we would need all of these fields identify which orders are what.
The issue is about order status only
But you can retrieve a full order from a market
func GetOrder(id string) (*environment.Order, error)
This should be ok