forked from thrasher-corp/gocryptotrader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlakebtc_types.go
114 lines (102 loc) · 3.15 KB
/
lakebtc_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
package lakebtc
// Ticker holds ticker information
type Ticker struct {
Last float64
Bid float64
Ask float64
High float64
Low float64
Volume float64
}
// OrderbookStructure stores price and amount for order books
type OrderbookStructure struct {
Price float64
Amount float64
}
// Orderbook contains arrays of orderbook information
type Orderbook struct {
Bids []OrderbookStructure `json:"bids"`
Asks []OrderbookStructure `json:"asks"`
}
// TickerResponse stores temp response
// Silly hack due to API returning null instead of strings
type TickerResponse struct {
Last interface{}
Bid interface{}
Ask interface{}
High interface{}
Low interface{}
Volume interface{}
}
// TradeHistory holds trade history data
type TradeHistory struct {
Date int64 `json:"data"`
Price float64 `json:"price,string"`
Amount float64 `json:"amount,string"`
TID int64 `json:"tid"`
}
// AccountInfo contains account information
type AccountInfo struct {
Balance map[string]string `json:"balance"`
Locked map[string]string `json:"locked"`
Profile struct {
Email string `json:"email"`
UID string `json:"uid"`
BTCDepositAddress string `json:"btc_deposit_addres"` // nolint: misspell
} `json:"profile"`
}
// Trade holds trade information
type Trade struct {
ID int64 `json:"id"`
Result string `json:"result"`
}
// OpenOrders stores full information on your open orders
type OpenOrders struct {
ID int64 `json:"id"`
Amount float64 `json:"amount,string"`
Price float64 `json:"price,string"`
Symbol string `json:"symbol"`
Type string `json:"type"`
At int64 `json:"at"`
}
// Orders holds current order information
type Orders struct {
ID int64 `json:"id"`
OriginalAmount float64 `json:"original_amount,string"`
Amount float64 `json:"amount,string"`
Price float64 `json:"price,string"`
Symbol string `json:"symbol"`
Type string `json:"type"`
State string `json:"state"`
At int64 `json:"at"`
}
// AuthenticatedTradeHistory is a store of personalised auth trade history
type AuthenticatedTradeHistory struct {
Type string `json:"type"`
Symbol string `json:"symbol"`
Amount float64 `json:"amount,string"`
Total float64 `json:"total,string"`
At int64 `json:"at"`
}
// ExternalAccounts holds external account information
type ExternalAccounts struct {
ID int64 `json:"id,string"`
Type string `json:"type"`
Address string `json:"address"`
Alias interface{} `json:"alias"`
Currencies string `json:"currencies"`
State string `json:"state"`
UpdatedAt int64 `json:"updated_at,string"`
}
// Withdraw holds withdrawal information
type Withdraw struct {
ID int64 `json:"id,string"`
Amount float64 `json:"amount,string"`
Currency string `json:"currency"`
Fee float64 `json:"fee,string"`
State string `json:"state"`
Source string `json:"source"`
ExternalAccountID int64 `json:"external_account_id,string"`
At int64 `json:"at"`
Error string `json:"error"`
}