Repository navigation
Expand file tree
/
Copy pathtypes.go
More file actions
276 lines (243 loc) · 9.14 KB
/
Copy pathtypes.go
File metadata and controls
276 lines (243 loc) · 9.14 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
package geminix
type Symbol string
type Currency string
type Network string
type Ticker struct {
Bid string `json:"bid"`
Ask string `json:"ask"`
Last string `json:"last"`
Volume map[string]interface{} `json:"volume"`
}
type Order struct {
OrderId string `json:"order_id"`
ClientOrderId string `json:"client_order_id"`
Symbol string `json:"symbol"`
Exchange string `json:"exchange"`
Price string `json:"price"`
AvgExecutionPrice string `json:"avg_execution_price"`
Side string `json:"side"`
Type string `json:"type"`
Options []string `json:"options"`
Timestamp string `json:"timestamp"`
Timestampms uint64 `json:"timestampms"`
IsLive bool `json:"is_live"`
IsCancelled bool `json:"is_cancelled"`
Reason string `json:"reason"`
WasForced bool `json:"was_forced"`
ExecutedAmount string `json:"executed_amount"`
RemainingAmount string `json:"remaining_amount"`
OriginalAmount string `json:"original_amount"`
IsHidden bool `json:"is_hidden"`
Trades []Trade `json:"trades"`
}
type Trade struct {
Price string `json:"price"`
Amount string `json:"amount"`
Timestamp uint64 `json:"timestamp"`
Timestampms uint64 `json:"timestampms"`
Type string `json:"type"`
Aggressor bool `json:"aggressor"`
FeeCurrency string `json:"fee_currency"`
FeeAmount string `json:"fee_amount"`
Tid uint `json:"tid"`
OrderId string `json:"order_id"`
ClientOrderId string `json:"client_order_id"`
Exchange string `json:"exchange"`
IsAuctionFill bool `json:"is_auction_fill"`
Break string `json:"break"`
}
type Balance struct {
Currency Currency `json:"currency"`
Amount string `json:"amount"`
AmountNotional string `json:"amountNotional"`
Available string `json:"available"`
AvailableNotional string `json:"availableNotional"`
AvailableForWithdrawal string `json:"availableForWithdrawal"`
AvailableForWithdrawalNotional string `json:"availableForWithdrawalNotional"`
Type string `json:"type"`
}
type Transfer struct {
Type string `json:"type"`
Status string `json:"status"`
Timestampms uint64 `json:"timestampms"`
EID uint `json:"eid"`
AdvanceEid uint `json:"advanceEid"`
Currency Currency `json:"currency"`
Amount string `json:"amount"`
Method string `json:"method"`
TxHash string `json:"txHash"`
OutputIdx uint `json:"outputIdx"`
Destination string `json:"destination"`
Purpose string `json:"purpose"`
}
type CryptoWithdrawal struct {
Address string `json:"address"`
Amount string `json:"amount"`
TxHash string `json:"txHash"`
WithdrawalId string `json:"withdrawalID"`
Result string `json:"result"`
Reason string `json:"reason"`
Message string `json:"message"`
}
type DepositAddress struct {
Address string `json:"address"`
Timestamp uint64 `json:"timestamp"`
Label string `json:"label"`
}
type InternalTransfer struct {
FromAccount string `json:"fromAccount"`
ToAccount string `json:"toAccount"`
Amount string `json:"amount"`
Fee string `json:"fee"`
Currency Currency `json:"currency"`
WithdrawalId string `json:"withdrawalId"`
UUID string `json:"uuid"`
Message string `json:"message"`
TxHash string `json:"txHash"`
}
type Account struct {
Name string `json:"name"`
AccountName string `json:"accountName"`
Account string `json:"account"`
ShortName string `json:"shortName"`
CounterpartyId string `json:"counterparty_id"`
Type string `json:"type"`
Created uint64 `json:"created"`
}
type User struct {
Name string `json:"name"`
LastSignIn string `json:"lastSignIn"`
Status string `json:"status"`
CountryCode string `json:"countryCode"`
IsVerified string `json:"isVerified"`
}
type AddressRequest struct {
Message string `json:"message"`
}
type AccountDetail struct {
Account Account `json:"account"`
Users []User `json:"users"`
}
/*
type Id string
func (id *Id) UnmarshalJSON(b []byte) error {
if len(b) > 0 && b[0] == '"' {
b = b[1:]
}
l := len(b)
if l > 0 && b[l-1] == '"' {
b = b[:l-1]
}
*id = Id(b)
return nil
}
type Order struct {
OrderId Id `json:"order_id"`
ClientOrderId string `json:"client_order_id"`
Symbol string `json:"symbol"`
Side string `json:"side"`
Type string `json:"type"`
Timestamp int64 `json:"timestampms"`
IsLive bool `json:"is_live"`
IsCancelled bool `json:"is_cancelled"`
IsHidden bool `json:"is_hidden"`
WasForced bool `json:"was_forced"`
Price float64 `json:"price,string"`
ExecutedAmount float64 `json:"executed_amount,string"`
RemainingAmount float64 `json:"remaining_amount,string"`
OriginalAmount float64 `json:"original_amount,string"`
AvgExecutionPrice float64 `json:"avg_execution_price,string"`
}
type Trade struct {
OrderId Id `json:"order_id"`
TradeId Id `json:"tid"`
Timestamp int64 `json:"timestampms"`
Exchange string `json:"exchange"`
Type string `json:"type"`
FeeCurrency string `json:"fee_currency"`
FeeAmount float64 `json:"fee_amount,string"`
Amount float64 `json:"amount,string"`
Price float64 `json:"price,string"`
IsAuctionFill bool `json:"is_auction_fill"`
Aggressor bool `json:"aggressor"`
Broken bool `json:"broken"`
Break string `json:"break"`
}
type Ticker struct {
Bid float64 `json:"bid,string"`
Ask float64 `json:"ask,string"`
Last float64 `json:"last,string"`
Volume TickerVolume `json:"volume"`
}
type TickerVolume struct {
BTC float64 `json:",string"`
ETH float64 `json:",string"`
USD float64 `json:",string"`
Timestamp int64 `json:"timestamp"`
}
type TradeVolume struct {
AccountId Id `json:"account_id"`
Symbol string `json:"symbol"`
BaseCurrency string `json:"base_currency"`
NotionalCurrency string `json:"notional_currency"`
DataDate string `json:"data_date"`
TotalVolumeBase float64 `json:"total_volume_base"`
MakeBuySellRatio float64 `json:"maker_buy_sell_ratio"`
BuyMakerBase float64 `json:"buy_maker_base"`
BuyMakerNotional float64 `json:"buy_maker_notional"`
BuyMakerCount float64 `json:"buy_maker_count"`
SellMakerBase float64 `json:"sell_maker_base"`
SellMakerNotional float64 `json:"sell_maker_notional"`
SellMakerCount float64 `json:"sell_maker_count"`
BuyTakerBase float64 `json:"buy_taker_base"`
BuyTakerNotional float64 `json:"buy_taker_notional"`
BuyTakerCount float64 `json:"buy_taker_count"`
SellTakerBase float64 `json:"sell_taker_base"`
SellTakerNotional float64 `json:"sell_taker_notional"`
SellTakerCount float64 `json:"sell_taker_count"`
}
type CurrentAuction struct {
ClosedUntil int64 `json:"closed_until_ms"`
LastAuctionEid Id `json:"last_auction_eid"`
LastAuctionPrice float64 `json:"last_auction_price,string"`
LastAuctionQuantity float64 `json:"last_auction_quantity,string"`
LastHighestBidPrice float64 `json:"last_highest_bid_price,string"`
LastLowestAskPrice float64 `json:"last_lowest_ask_price,string"`
MostRecentIndicativePrice float64 `json:"most_recent_indicative_price,string"`
MostRecentIndicativeQuantity float64 `json:"most_recent_indicative_quantity,string"`
MostRecentHighestBidPrice float64 `json:"most_recent_highest_bid_price,string"`
MostRecentLowestAskPrice float64 `json:"most_recent_lowest_ask_price,string"`
NextUpdate int64 `json:"next_update_ms"`
NextAuction int64 `json:"next_auction_ms"`
}
type Auction struct {
Timestamp int64 `json:"timestampms"`
AuctionId Id `json:"auction_id"`
Eid Id `json:"eid"`
EventType string `json:"event_type"`
AuctionResult string `json:"auction_result"`
AuctionPrice float64 `json:"auction_price,string"`
AuctionQuantity float64 `json:"auction_quantity,string"`
HighestBidPrice float64 `json:"highest_bid_price,string"`
LowestAskPrice float64 `json:"lowest_ask_price,string"`
}
type CancelResult struct {
Response
Details CancelResultDetails
}
type CancelResultDetails struct {
CancelledOrders []Id
CancelRejects []Id
}
type FundBalance struct {
Type string `json:"type"`
Currency string `json:"currency"`
Amount float64 `json:"amount,string"`
Available float64 `json:"available,string"`
AvailableForWithdrawal float64 `json:"availableForWithdrawal,string"`
}
type WithdrawFundsResult struct {
Destination string `json:"destination"`
TxHash string `json:"txHash"`
Amount float64 `json:"amount,string"`
}*/