Documentation
¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, req CreateReq) (*Trade, error)
- func (c *Client) Currencies(ctx context.Context) ([]Currency, error)
- func (c *Client) Estimate(ctx context.Context, from, fromNet, to, toNet string, amount float64) (*Estimate, error)
- func (c *Client) Status(ctx context.Context, id string) (*Trade, error)
- type CreateReq
- type Currency
- type Estimate
- type Option
- type Route
- type Trade
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type CreateReq ¶
type CreateReq struct {
Provider string `json:"provider"`
Engine string `json:"engine,omitempty"`
FromCurrency string `json:"from_currency"`
ToCurrency string `json:"to_currency"`
FromNetwork string `json:"from_network,omitempty"`
ToNetwork string `json:"to_network,omitempty"`
AmountFrom float64 `json:"amount_from,omitempty"`
AmountTo float64 `json:"amount_to,omitempty"`
AddressTo string `json:"address_to"`
FixedRate bool `json:"fixed_rate,omitempty"`
HoudiniQuote any `json:"_houdiniQuote,omitempty"`
AddressMemo string `json:"address_memo,omitempty"`
Source string `json:"source,omitempty"`
}
type Currency ¶
type Currency struct {
ID string `json:"id"`
Ticker string `json:"ticker"`
Network string `json:"network"`
Name string `json:"name"`
Image string `json:"image,omitempty"`
Minimum float64 `json:"minimum,omitempty"`
Maximum float64 `json:"maximum,omitempty"`
Memo bool `json:"memo,omitempty"`
Engine string `json:"engine,omitempty"`
Engines []string `json:"engines,omitempty"`
Priority int `json:"priority,omitempty"`
}
type Estimate ¶
type Estimate struct {
ID string `json:"id"`
Rate float64 `json:"rate"`
AmountFrom float64 `json:"amount_from"`
AmountTo float64 `json:"amount_to"`
Min float64 `json:"min"`
Max float64 `json:"max"`
Provider string `json:"provider"`
Engine string `json:"engine"`
KYCRating string `json:"kyc_rating"`
ETA int `json:"eta"`
Routes []Route `json:"routes"`
}
type Route ¶
type Route struct {
Provider string `json:"provider"`
Engine string `json:"engine"`
AmountTo float64 `json:"amount_to"`
AmountFrom float64 `json:"amount_from"`
KYC string `json:"kyc"`
LogPolicy string `json:"log_policy"`
ETA int `json:"eta"`
Fixed bool `json:"fixed"`
Spread float64 `json:"spread,omitempty"`
HoudiniQuote any `json:"_houdiniQuote,omitempty"`
}
type Trade ¶
type Trade struct {
ID string `json:"id"`
TradeID string `json:"trade_id,omitempty"`
Status string `json:"status"`
Engine string `json:"engine"`
Provider string `json:"provider"`
FromTicker string `json:"fromTicker"`
FromNetwork string `json:"fromNetwork"`
FromAmount float64 `json:"fromAmount"`
ToTicker string `json:"toTicker"`
ToNetwork string `json:"toNetwork"`
ToAmount float64 `json:"toAmount"`
DepositAddress string `json:"depositAddress"`
DepositMemo string `json:"depositMemo,omitempty"`
AddressUser string `json:"address_user"`
TxIn string `json:"txIn,omitempty"`
TxOut string `json:"txOut,omitempty"`
OrderURL string `json:"orderUrl,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.