orders

package
v0.0.0-...-4c12c4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 0 Imported by: 0

README

GoCryptoTrader package Orders

Build Status Software License GoDoc Coverage Status Go Report Card

This orders package is part of the GoCryptoTrader codebase.

This is still in active development

You can track ideas, planned features and what's in progresss on this Trello board: https://trello.com/b/ZAhMhpOy/gocryptotrader.

Join our slack to discuss all things related to GoCryptoTrader! GoCryptoTrader Slack

Current Features for orders

  • This package services the exchanges package with order handling.
    • Creation of order
    • Deletion of order
    • Order tracking
Please click GoDocs chevron above to view current GoDoc information for this package

Contribution

Please feel free to submit any pull requests or suggest any desired features to be added.

When submitting a PR, please abide by our coding guidelines:

  • Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
  • Code must be documented adhering to the official Go commentary guidelines.
  • Code must adhere to our coding style.
  • Pull requests need to be based on and opened against the master branch.

Donations

If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:

1F5zVDgNjorJ51oGebSvNCrSAHpwGkUdDB

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Orders []*Order

Orders variable holds an array of pointers to order structs

Functions

func DeleteOrder

func DeleteOrder(orderID int) bool

DeleteOrder deletes orders by ID and returns state

func NewOrder

func NewOrder(exchangeName string, amount, price float64) int

NewOrder creates a new order and returns a an orderID

Types

type Order

type Order struct {
	OrderID  int
	Exchange string
	Type     int
	Amount   float64
	Price    float64
}

Order struct holds order values

func GetOrderByOrderID

func GetOrderByOrderID(orderID int) *Order

GetOrderByOrderID returns order pointer by ID

func GetOrdersByExchange

func GetOrdersByExchange(exchange string) []*Order

GetOrdersByExchange returns order pointer grouped by exchange

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL