package
Version:
v0.0.0-...-46f0560
Opens a new window with list of versions in this module.
Published: Nov 28, 2023
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func NewBotHandler(url, token string) *botHandler
type Account struct {
Id int `json:"id"`
Login string `json:"login"`
Wealth int `json:"wealth"`
}
type Asset struct {
Id int64 `json:"company_id"`
Quantity int64 `json:"count"`
}
type Bids struct {
Price int64 `json:"Price"`
Quantity int64 `json:"Quantity"`
}
type BotHandler interface {
LimitPriceSell(symbolId int64, price int64) (int, io.ReadCloser, error)
LimitPriceBuy(symbolId int64, price int64) (int, io.ReadCloser, error)
BestPriceSell(symbolId int64) (int, error)
BestPriceBuy(symbolId int64) (int, error)
GetCompanies() ([]Symbol, error)
GetInfo() (Info, error)
}
type Info struct {
Account Account `json:"account"`
Assets []Asset `json:"assets"`
}
type LimitPriceBid struct {
Id int64 `json:"id"`
Account Account `json:"account"`
SymbolId int64 `json:"SymbolId"`
Price int64 `json:"Price"`
Type string `json:"type"`
CreateDate string `json:"createDate"`
}
type Stock struct {
Id int64 `json:"id"`
Ticker string `json:"ticker"`
Bids []Bids `json:"bids"`
}
type Symbol struct {
Id int64 `json:"id"`
Ticker string `json:"name"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.