arkham

package module
v0.0.0-...-d49c928 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 20 Imported by: 0

README

Arkham Exchange Go SDK

This is the official Go SDK for interacting with the Arkham Exchange API. It provides a convenient way to access various endpoints and perform operations related to Arkham Exchange.

Installation

To install the SDK, use the following command:

go get github.com/arkhamintelligence/arkham-sdk-go

Basic Usage

package main

import (
	"context"
	"fmt"

	"github.com/arkhamintelligence/arkham-sdk-go"
)

func main() {
	config := arkham.Config{}

	if err := config.LoadFromEnv(); err != nil {
        fmt.Println("Failed to load config from environment:", err)
        return
	}

    client, err := arkham.NewClient(config)

    if err != nil {
        fmt.Println("Failed to create Arkham client:", err)
        return
	}

    pairs, err := client.GetPairs(context.Background())
    if err != nil {
        fmt.Println("Failed to fetch market data:", err)
        return
    }

    prettyPairs, err := json.MarshalIndent(pairs, "", "  ")
    if err != nil {
        fmt.Println("Failed to marshal market data:", err)
        return
    }
    fmt.Println("Pairs:", string(prettyPairs))
}

Documentation

Overview

Package arkham provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.

Package arkham provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.

Code generated by internal/sdkgen/go/generate.go; DO NOT EDIT.

Index

Constants

View Source
const (
	ARKHAM_PROD_API_URL = "https://arkm.com/api"
	ARKHAM_PROD_WS_URL  = "wss://arkm.com/ws"
)
View Source
const (
	Api_keyScopes   = "api_key.Scopes"
	SignatureScopes = "signature.Scopes"
)

Variables

View Source
var ErrNotConnected = errors.New("WebSocket client is not connected")

Functions

This section is empty.

Types

type AccountWithdrawJSONRequestBody

type AccountWithdrawJSONRequestBody = AccountWithdrawRequest

AccountWithdrawJSONRequestBody defines body for AccountWithdraw for application/json ContentType.

type AccountWithdrawRequest

type AccountWithdrawRequest struct {
	AddressId    int                             `json:"addressId"`
	Amount       string                          `json:"amount"`
	Beneficiary  WithdrawalTravelRuleBeneficiary `json:"beneficiary,omitempty,omitzero"`
	SubaccountId int                             `json:"subaccountId"`
	Symbol       string                          `json:"symbol"`
}

AccountWithdrawRequest defines model for AccountWithdrawRequest.

type AccountWithdrawResponseBody

type AccountWithdrawResponseBody = int

AccountWithdrawResponseBody defines body from AccountWithdraw response

type AccountWithdrawUsingMFAJSONRequestBody

type AccountWithdrawUsingMFAJSONRequestBody = AccountWithdrawUsingMFARequest

AccountWithdrawUsingMFAJSONRequestBody defines body for AccountWithdrawUsingMFA for application/json ContentType.

type AccountWithdrawUsingMFARequest

type AccountWithdrawUsingMFARequest struct {
	Address      string                          `json:"address"`
	Amount       string                          `json:"amount"`
	Beneficiary  WithdrawalTravelRuleBeneficiary `json:"beneficiary,omitempty,omitzero"`
	Chain        string                          `json:"chain"`
	IsMoonpay    bool                            `json:"isMoonpay"`
	SubaccountId int                             `json:"subaccountId"`
	Symbol       string                          `json:"symbol"`
}

AccountWithdrawUsingMFARequest defines model for AccountWithdrawUsingMFARequest.

type AccountWithdrawUsingMFAResponseBody

type AccountWithdrawUsingMFAResponseBody = int

AccountWithdrawUsingMFAResponseBody defines body from AccountWithdrawUsingMFA response

type AddToWatchlistJSONRequestBody

type AddToWatchlistJSONRequestBody = AddToWatchlistRequest

AddToWatchlistJSONRequestBody defines body for AddToWatchlist for application/json ContentType.

type AddToWatchlistRequest

type AddToWatchlistRequest struct {
	Symbol string `json:"symbol"`
}

AddToWatchlistRequest defines model for AddToWatchlistRequest.

type Airdrop

type Airdrop struct {
	Amount       string `json:"amount"`
	AssetSymbol  string `json:"assetSymbol"`
	Id           int    `json:"id"`
	SubaccountId int    `json:"subaccountId"`

	// Time Time in microseconds since unix epoch
	Time   int `json:"time"`
	UserId int `json:"userId"`
}

Airdrop defines model for Airdrop.

type AirdropClaim

type AirdropClaim struct {
	Address   string   `json:"address,omitempty,omitzero"`
	Amount    string   `json:"amount,omitempty,omitzero"`
	Claimed   bool     `json:"claimed,omitempty,omitzero"`
	Eligible  bool     `json:"eligible"`
	PassedKYC bool     `json:"passedKYC"`
	Proof     []string `json:"proof,omitempty,omitzero"`
	Wei       string   `json:"wei,omitempty,omitzero"`
}

AirdropClaim defines model for AirdropClaim.

type Alert

type Alert struct {
	Id int `json:"id"`

	// LastUpdated Time in microseconds since unix epoch
	LastUpdated int    `json:"lastUpdated"`
	Message     string `json:"message"`
	Type        string `json:"type"`
}

Alert defines model for Alert.

type AlertPriceType

type AlertPriceType string

AlertPriceType defines model for AlertPriceType.

const (
	AlertPriceTypeIndex AlertPriceType = "index"
	AlertPriceTypeLast  AlertPriceType = "last"
	AlertPriceTypeMark  AlertPriceType = "mark"
)

Defines values for AlertPriceType.

type AlertType

type AlertType string

AlertType defines model for AlertType.

const (
	AlertTypeAbove AlertType = "above"
	AlertTypeBelow AlertType = "below"
)

Defines values for AlertType.

type AllowanceHolderAllowanceIssue

type AllowanceHolderAllowanceIssue struct {
	Actual  string `json:"actual"`
	Spender string `json:"spender"`
}

AllowanceHolderAllowanceIssue defines model for AllowanceHolderAllowanceIssue.

type AllowanceHolderBalanceIssue

type AllowanceHolderBalanceIssue struct {
	Actual   string `json:"actual"`
	Expected string `json:"expected"`
	Token    string `json:"token"`
}

AllowanceHolderBalanceIssue defines model for AllowanceHolderBalanceIssue.

type AllowanceHolderBaseResponse

type AllowanceHolderBaseResponse struct {
	BlockNumber        string                       `json:"blockNumber,omitzero"`
	BuyAmount          string                       `json:"buyAmount,omitzero"`
	BuyToken           string                       `json:"buyToken,omitzero"`
	Fees               AllowanceHolderFees          `json:"fees,omitempty,omitzero"`
	Gas                string                       `json:"gas,omitzero"`
	GasPrice           string                       `json:"gasPrice,omitzero"`
	Issues             AllowanceHolderIssues        `json:"issues,omitempty,omitzero"`
	LiquidityAvailable bool                         `json:"liquidityAvailable"`
	MinBuyAmount       string                       `json:"minBuyAmount,omitzero"`
	Route              AllowanceHolderRoute         `json:"route,omitempty,omitzero"`
	SellAmount         string                       `json:"sellAmount,omitzero"`
	SellToken          string                       `json:"sellToken,omitzero"`
	TokenMetadata      AllowanceHolderTokenMetadata `json:"tokenMetadata,omitempty,omitzero"`
	TotalNetworkFee    string                       `json:"totalNetworkFee,omitzero"`
	Transaction        AllowanceHolderTransaction   `json:"transaction,omitempty,omitzero"`
	Zid                string                       `json:"zid"`
}

AllowanceHolderBaseResponse defines model for AllowanceHolderBaseResponse.

type AllowanceHolderFee

type AllowanceHolderFee struct {
	Amount string `json:"amount"`
	Token  string `json:"token"`
	Type   string `json:"type"`
}

AllowanceHolderFee defines model for AllowanceHolderFee.

type AllowanceHolderFees

type AllowanceHolderFees struct {
	GasFee        AllowanceHolderFee `json:"gasFee"`
	IntegratorFee AllowanceHolderFee `json:"integratorFee"`
	ZeroExFee     AllowanceHolderFee `json:"zeroExFee"`
}

AllowanceHolderFees defines model for AllowanceHolderFees.

type AllowanceHolderIssues

type AllowanceHolderIssues struct {
	Allowance            AllowanceHolderAllowanceIssue `json:"allowance"`
	Balance              AllowanceHolderBalanceIssue   `json:"balance"`
	InvalidSourcesPassed []string                      `json:"invalidSourcesPassed"`
	SimulationIncomplete bool                          `json:"simulationIncomplete"`
}

AllowanceHolderIssues defines model for AllowanceHolderIssues.

type AllowanceHolderRoute

type AllowanceHolderRoute struct {
	Fills  []AllowanceHolderRouteFill  `json:"fills"`
	Tokens []AllowanceHolderRouteToken `json:"tokens"`
}

AllowanceHolderRoute defines model for AllowanceHolderRoute.

type AllowanceHolderRouteFill

type AllowanceHolderRouteFill struct {
	From          string `json:"from"`
	ProportionBps string `json:"proportionBps"`
	Source        string `json:"source"`
	To            string `json:"to"`
}

AllowanceHolderRouteFill defines model for AllowanceHolderRouteFill.

type AllowanceHolderRouteToken

type AllowanceHolderRouteToken struct {
	Address string `json:"address"`
	Symbol  string `json:"symbol"`
}

AllowanceHolderRouteToken defines model for AllowanceHolderRouteToken.

type AllowanceHolderTokenMetadata

type AllowanceHolderTokenMetadata struct {
	BuyToken  AllowanceHolderTokenTaxMetadata `json:"buyToken"`
	SellToken AllowanceHolderTokenTaxMetadata `json:"sellToken"`
}

AllowanceHolderTokenMetadata defines model for AllowanceHolderTokenMetadata.

type AllowanceHolderTokenTaxMetadata

type AllowanceHolderTokenTaxMetadata struct {
	BuyTaxBps  string `json:"buyTaxBps"`
	SellTaxBps string `json:"sellTaxBps"`
}

AllowanceHolderTokenTaxMetadata defines model for AllowanceHolderTokenTaxMetadata.

type AllowanceHolderTransaction

type AllowanceHolderTransaction struct {
	Data     string `json:"data"`
	Gas      string `json:"gas"`
	GasPrice string `json:"gasPrice"`
	To       string `json:"to"`
	Value    string `json:"value"`
}

AllowanceHolderTransaction defines model for AllowanceHolderTransaction.

type Announcement

type Announcement struct {
	Content string `json:"content"`

	// CreatedAt Time in microseconds since unix epoch
	CreatedAt int `json:"createdAt"`
	Id        int `json:"id"`
}

Announcement defines model for Announcement.

type ApiKey

type ApiKey struct {
	// CreatedAt Time in microseconds since unix epoch
	CreatedAt   int      `json:"createdAt"`
	Id          int      `json:"id"`
	IpWhitelist []string `json:"ipWhitelist"`
	Name        string   `json:"name"`
	Read        bool     `json:"read"`
	Write       bool     `json:"write"`
}

ApiKey defines model for ApiKey.

type ApiKeyCreateJSONRequestBody

type ApiKeyCreateJSONRequestBody = CreateApiKeyRequest

ApiKeyCreateJSONRequestBody defines body for ApiKeyCreate for application/json ContentType.

type ApiKeyCreateResponseBody

type ApiKeyCreateResponseBody = ApiKeyWithSecret

ApiKeyCreateResponseBody defines body from ApiKeyCreate response

type ApiKeyUpdateJSONRequestBody

type ApiKeyUpdateJSONRequestBody = ApiKeyUpdateRequest

ApiKeyUpdateJSONRequestBody defines body for ApiKeyUpdate for application/json ContentType.

type ApiKeyUpdateRequest

type ApiKeyUpdateRequest struct {
	IpWhitelist []string `json:"ipWhitelist"`
	Name        string   `json:"name"`
	Read        bool     `json:"read"`
	Write       bool     `json:"write"`
}

ApiKeyUpdateRequest defines model for ApiKeyUpdateRequest.

type ApiKeyUpdateResponseBody

type ApiKeyUpdateResponseBody = string

ApiKeyUpdateResponseBody defines body from ApiKeyUpdate response

type ApiKeyWithSecret

type ApiKeyWithSecret struct {
	// CreatedAt Time in microseconds since unix epoch
	CreatedAt   int      `json:"createdAt"`
	Id          int      `json:"id"`
	IpWhitelist []string `json:"ipWhitelist"`
	Key         UUID     `json:"key"`
	Name        string   `json:"name"`
	Read        bool     `json:"read"`

	// Secret Base64 encoded 32 byte secret
	Secret Secret `json:"secret"`
	Write  bool   `json:"write"`
}

ApiKeyWithSecret defines model for ApiKeyWithSecret.

type ApiKeysListResponseBody

type ApiKeysListResponseBody = []ApiKey

ApiKeysListResponseBody defines body from ApiKeysList response

type ArkhamWebSocket

type ArkhamWebSocket struct {
	// contains filtered or unexported fields
}

ArkhamWebSocket represents a WebSocket client for Arkham API

func NewArkhamWebSocket

func NewArkhamWebSocket(config Config) *ArkhamWebSocket

NewArkhamWebSocket creates a new WebSocket client instance

func (*ArkhamWebSocket) Balances

func (ws *ArkhamWebSocket) Balances(params BalanceSubscriptionParams, onUpdate func(data Balance), onSnapshot func(data []Balance)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) CancelAll

func (*ArkhamWebSocket) CancelAllTriggerOrders

func (*ArkhamWebSocket) CancelOrder

func (*ArkhamWebSocket) CancelTriggerOrder

func (*ArkhamWebSocket) Candles

func (ws *ArkhamWebSocket) Candles(params CandleSubscriptionParams, onUpdate func(data Candle)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) Close

func (ws *ArkhamWebSocket) Close() error

Close closes the WebSocket connection

func (*ArkhamWebSocket) Connect

func (ws *ArkhamWebSocket) Connect(ctx context.Context) error

Connect establishes WebSocket connection to the server

func (*ArkhamWebSocket) CreateOrder

func (*ArkhamWebSocket) CreateTriggerOrder

func (*ArkhamWebSocket) IsConnected

func (ws *ArkhamWebSocket) IsConnected() bool

func (*ArkhamWebSocket) L1Updates

func (ws *ArkhamWebSocket) L1Updates(params L1OrderBookSubscriptionParams, onUpdate func(data L1OrderBook), onSnapshot func(data L1OrderBook)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) L2Updates

func (ws *ArkhamWebSocket) L2Updates(params L2OrderBookSubscriptionParams, onUpdate func(data L2Update), onSnapshot func(data OrderBook)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) LspAssignments

func (ws *ArkhamWebSocket) LspAssignments(params LspAssignmentSubscriptionParams, onUpdate func(data LspAssignment)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) Margin

func (ws *ArkhamWebSocket) Margin(params MarginSubscriptionParams, onUpdate func(data Margin), onSnapshot func(data Margin)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) OrderStatuses

func (ws *ArkhamWebSocket) OrderStatuses(params OrderStatusSubscriptionParams, onUpdate func(data Order), onSnapshot func(data []Order)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) Ping

func (ws *ArkhamWebSocket) Ping() error

Ping sends a ping message and waits for pong response

func (*ArkhamWebSocket) Positions

func (ws *ArkhamWebSocket) Positions(params PositionSubscriptionParams, onUpdate func(data Position), onSnapshot func(data []Position)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) Ticker

func (ws *ArkhamWebSocket) Ticker(params TickerSubscriptionParams, onUpdate func(data Ticker), onSnapshot func(data Ticker)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) Trades

func (ws *ArkhamWebSocket) Trades(params TradeSubscriptionParams, onUpdate func(data Trade), onSnapshot func(data []Trade)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) TriggerOrders

func (ws *ArkhamWebSocket) TriggerOrders(params TriggerOrderSubscriptionParams, onUpdate func(data TriggerOrder), onSnapshot func(data []TriggerOrder)) (UnsubscribeFunc, error)

func (*ArkhamWebSocket) Wait

func (ws *ArkhamWebSocket) Wait(ctx context.Context) error

Wait blocks until the WebSocket connection is closed

type Asset

type Asset struct {
	Chains        []Blockchain  `json:"chains"`
	FeaturedPair  string        `json:"featuredPair"`
	ImageUrl      string        `json:"imageUrl"`
	MinDeposit    string        `json:"minDeposit"`
	MinWithdrawal string        `json:"minWithdrawal"`
	MoonPayChain  string        `json:"moonPayChain,omitempty,omitzero"`
	MoonPayCode   string        `json:"moonPayCode,omitempty,omitzero"`
	Name          string        `json:"name"`
	Stablecoin    bool          `json:"stablecoin"`
	Status        ListingStatus `json:"status"`
	Symbol        string        `json:"symbol"`
	WithdrawalFee string        `json:"withdrawalFee"`
}

Asset defines model for Asset.

type AuthenticateFormdataRequestBody

type AuthenticateFormdataRequestBody = FormDataAuthenticateRequest

AuthenticateFormdataRequestBody defines body for Authenticate for application/x-www-form-urlencoded ContentType.

type AuthenticateParams

type AuthenticateParams struct {
	TradeInToken string `form:"tradeInToken,omitempty" json:"tradeInToken,omitempty,omitzero"`
	RedirectPath string `form:"redirectPath,omitempty" json:"redirectPath,omitempty,omitzero"`
}

AuthenticateParams defines parameters for Authenticate.

type Balance

type Balance struct {
	Balance          string               `json:"balance"`
	BalanceUSDT      string               `json:"balanceUSDT"`
	Free             string               `json:"free"`
	FreeUSDT         string               `json:"freeUSDT"`
	LastUpdateAmount string               `json:"lastUpdateAmount"`
	LastUpdateId     int                  `json:"lastUpdateId"`
	LastUpdateReason PositionUpdateReason `json:"lastUpdateReason"`

	// LastUpdateTime Time in microseconds since unix epoch
	LastUpdateTime int    `json:"lastUpdateTime"`
	PriceUSDT      string `json:"priceUSDT"`
	SubaccountId   int    `json:"subaccountId"`
	Symbol         string `json:"symbol"`
}

Balance defines model for Balance.

type BalanceSubscriptionParams

type BalanceSubscriptionParams struct {
	Snapshot bool `json:"snapshot,omitempty,omitzero"`

	// SnapshotInterval Interval in seconds for getting snapshot data, set to regularly get refreshed snapshot values
	SnapshotInterval SnapshotInterval `json:"snapshotInterval,omitempty,omitzero"`
	SubaccountId     int              `json:"subaccountId,omitempty,omitzero"`
}

BalanceSubscriptionParams defines model for BalanceSubscriptionParams.

type BalanceUpdate

type BalanceUpdate struct {
	Amount       string               `json:"amount"`
	AssetSymbol  string               `json:"assetSymbol"`
	Balance      string               `json:"balance"`
	Id           int                  `json:"id"`
	Reason       PositionUpdateReason `json:"reason"`
	SubaccountId int                  `json:"subaccountId"`

	// Time Time in microseconds since unix epoch
	Time int `json:"time"`
}

BalanceUpdate defines model for BalanceUpdate.

type Blockchain

type Blockchain struct {
	AssetSymbol   string `json:"assetSymbol"`
	BlockTime     int    `json:"blockTime"`
	Confirmations int    `json:"confirmations"`
	Name          string `json:"name"`
	Symbol        string `json:"symbol"`
	Type          int    `json:"type"`
}

Blockchain defines model for Blockchain.

type CancelAllJSONRequestBody

type CancelAllJSONRequestBody = CancelAllRequest

CancelAllJSONRequestBody defines body for CancelAll for application/json ContentType.

type CancelAllRequest

type CancelAllRequest struct {
	SubaccountId int `json:"subaccountId"`

	// TimeToCancel Time to cancel all orders, 0 for immediate. Granularity is 1 second. Use this to set a dead man's switch.
	TimeToCancel int `json:"timeToCancel"`
}

CancelAllRequest defines model for CancelAllRequest.

type CancelAllResponse

type CancelAllResponse = map[string]interface{}

CancelAllResponse defines model for CancelAllResponse.

type CancelAllTriggerOrdersJSONRequestBody

type CancelAllTriggerOrdersJSONRequestBody = CancelAllTriggerOrdersRequest

CancelAllTriggerOrdersJSONRequestBody defines body for CancelAllTriggerOrders for application/json ContentType.

type CancelAllTriggerOrdersRequest

type CancelAllTriggerOrdersRequest struct {
	SubaccountId     int         `json:"subaccountId"`
	Symbol           string      `json:"symbol"`
	TriggerPriceType interface{} `json:"triggerPriceType,omitempty,omitzero"`
}

CancelAllTriggerOrdersRequest defines model for CancelAllTriggerOrdersRequest.

type CancelAllTriggerOrdersResponse

type CancelAllTriggerOrdersResponse struct {
	SubaccountId     int         `json:"subaccountId"`
	Symbol           string      `json:"symbol"`
	TriggerPriceType interface{} `json:"triggerPriceType,omitempty,omitzero"`
}

CancelAllTriggerOrdersResponse defines model for CancelAllTriggerOrdersResponse.

type CancelAllTriggerOrdersResponseBody

type CancelAllTriggerOrdersResponseBody = CancelAllTriggerOrdersResponse

CancelAllTriggerOrdersResponseBody defines body from CancelAllTriggerOrders response

type CancelOrderJSONRequestBody

type CancelOrderJSONRequestBody = CancelOrderRequest

CancelOrderJSONRequestBody defines body for CancelOrder for application/json ContentType.

type CancelOrderRequest

type CancelOrderRequest struct {
	// ClientOrderId client order ID to cancel, required if orderId is not provided
	ClientOrderId string `json:"clientOrderId,omitempty,omitzero"`

	// OrderId order ID to cancel, required if clientOrderId is not provided
	OrderId      int `json:"orderId,omitempty,omitzero"`
	SubaccountId int `json:"subaccountId,omitempty,omitzero"`

	// TimeToCancel Time to cancel the order, 0 for immediate. Granularity is 1 second.
	TimeToCancel int `json:"timeToCancel,omitempty,omitzero"`
}

CancelOrderRequest defines model for CancelOrderRequest.

type CancelOrderResponse

type CancelOrderResponse struct {
	OrderId int `json:"orderId"`
}

CancelOrderResponse defines model for CancelOrderResponse.

type CancelOrderResponseBody

type CancelOrderResponseBody = CancelOrderResponse

CancelOrderResponseBody defines body from CancelOrder response

type CancelReplaceOrderJSONRequestBody

type CancelReplaceOrderJSONRequestBody = CancelReplaceOrderRequest

CancelReplaceOrderJSONRequestBody defines body for CancelReplaceOrder for application/json ContentType.

type CancelReplaceOrderRequest

type CancelReplaceOrderRequest struct {
	// CancelClientOrderId Client Order ID of the order to cancel and replace with the new order
	CancelClientOrderId string `json:"cancelClientOrderId,omitempty,omitzero"`

	// CancelOrderId ID of the order to cancel and replace with the new order
	CancelOrderId int `json:"cancelOrderId,omitempty,omitzero"`

	// CancelSubaccountId Subaccount ID of the order to cancel and replace with the new order
	CancelSubaccountId int    `json:"cancelSubaccountId,omitempty,omitzero"`
	ClientOrderId      string `json:"clientOrderId,omitzero"`

	// PostOnly if true, the order will be closed if it can be matched immediately. Only supported on limit gtc orders.
	PostOnly bool `json:"postOnly,omitempty,omitzero"`

	// Price limit price, 0 for market orders
	Price string `json:"price,omitempty,omitzero"`

	// ReduceOnly if true, the order will only reduce the position size.
	ReduceOnly   bool      `json:"reduceOnly,omitempty,omitzero"`
	Side         OrderSide `json:"side"`
	Size         string    `json:"size"`
	SubaccountId int       `json:"subaccountId,omitempty,omitzero"`
	Symbol       string    `json:"symbol"`
	Type         OrderType `json:"type"`
}

CancelReplaceOrderRequest defines model for CancelReplaceOrderRequest.

type CancelReplaceOrderResponse

type CancelReplaceOrderResponse struct {
	CancelResponse CancelOrderResponse `json:"cancelResponse,omitempty,omitzero"`
	CreateResponse CreateOrderResponse `json:"createResponse,omitempty,omitzero"`
}

CancelReplaceOrderResponse defines model for CancelReplaceOrderResponse.

type CancelReplaceOrderResponseBody

type CancelReplaceOrderResponseBody = CancelReplaceOrderResponse

CancelReplaceOrderResponseBody defines body from CancelReplaceOrder response

type CancelTriggerOrderJSONRequestBody

type CancelTriggerOrderJSONRequestBody = CancelTriggerOrderRequest

CancelTriggerOrderJSONRequestBody defines body for CancelTriggerOrder for application/json ContentType.

type CancelTriggerOrderRequest

type CancelTriggerOrderRequest struct {
	ClientOrderId    string      `json:"clientOrderId,omitempty,omitzero"`
	SubaccountId     int         `json:"subaccountId,omitempty,omitzero"`
	Symbol           string      `json:"symbol"`
	TriggerOrderId   int         `json:"triggerOrderId,omitempty,omitzero"`
	TriggerPriceType interface{} `json:"triggerPriceType,omitempty,omitzero"`
}

CancelTriggerOrderRequest defines model for CancelTriggerOrderRequest.

type CancelTriggerOrderResponse

type CancelTriggerOrderResponse struct {
	ClientOrderId    string      `json:"clientOrderId,omitempty,omitzero"`
	SubaccountId     int         `json:"subaccountId,omitempty,omitzero"`
	Symbol           string      `json:"symbol"`
	TriggerOrderId   int         `json:"triggerOrderId,omitempty,omitzero"`
	TriggerPriceType interface{} `json:"triggerPriceType,omitempty,omitzero"`
}

CancelTriggerOrderResponse defines model for CancelTriggerOrderResponse.

type CancelTriggerOrderResponseBody

type CancelTriggerOrderResponseBody = CancelTriggerOrderResponse

CancelTriggerOrderResponseBody defines body from CancelTriggerOrder response

type Candle

type Candle struct {
	Close       string `json:"close"`
	Duration    int    `json:"duration"`
	High        string `json:"high"`
	Low         string `json:"low"`
	Open        string `json:"open"`
	QuoteVolume string `json:"quoteVolume"`
	Symbol      string `json:"symbol"`

	// Time Time in microseconds since unix epoch
	Time   int    `json:"time"`
	Volume string `json:"volume"`
}

Candle defines model for Candle.

type CandleDuration

type CandleDuration string

CandleDuration defines model for CandleDuration.

const (
	CandleDurationD15m CandleDuration = "15m"
	CandleDurationD1h  CandleDuration = "1h"
	CandleDurationD1m  CandleDuration = "1m"
	CandleDurationD24h CandleDuration = "24h"
	CandleDurationD30m CandleDuration = "30m"
	CandleDurationD5m  CandleDuration = "5m"
	CandleDurationD6h  CandleDuration = "6h"
)

Defines values for CandleDuration.

type CandleSubscriptionParams

type CandleSubscriptionParams struct {
	Duration CandleDuration `json:"duration,omitempty,omitzero"`
	Symbol   string         `json:"symbol"`
}

CandleSubscriptionParams defines model for CandleSubscriptionParams.

type ClaimVoucherJSONRequestBody

type ClaimVoucherJSONRequestBody = VoucherClaimRequest

ClaimVoucherJSONRequestBody defines body for ClaimVoucher for application/json ContentType.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client The Arkham REST API client

func NewClient

func NewClient(config Config) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) AccountWithdraw

Account Withdraw

func (*Client) AccountWithdrawUsingMFA

Account Withdraw With MFA

func (*Client) AddToWatchlist

func (c *Client) AddToWatchlist(ctx context.Context, body AddToWatchlistRequest) error

Add to Watchlist

Add a pair to the watchlist

func (*Client) ApiKeyCreate

Api Key Create

func (*Client) ApiKeyUpdate

func (c *Client) ApiKeyUpdate(ctx context.Context, id int, body ApiKeyUpdateRequest) (*ApiKeyUpdateResponseBody, error)

Api Key Update

func (*Client) ApiKeysDelete

func (c *Client) ApiKeysDelete(ctx context.Context, id int) error

Api Key Delete

func (*Client) ApiKeysList

func (c *Client) ApiKeysList(ctx context.Context) (*ApiKeysListResponseBody, error)

Api Key List

func (*Client) CancelAll

func (c *Client) CancelAll(ctx context.Context, body CancelAllRequest) error

Cancel All

func (*Client) CancelAllTriggerOrders

Cancel AllTrigger Orders

func (*Client) CancelOrder

func (c *Client) CancelOrder(ctx context.Context, body CancelOrderRequest) (*CancelOrderResponseBody, error)

Cancel Order

func (*Client) CancelReplaceOrder

Cancel and Replace Order

func (*Client) CancelTriggerOrder

Cancel Trigger Order

func (*Client) ClaimVoucher

func (c *Client) ClaimVoucher(ctx context.Context, body VoucherClaimRequest) error

Claim voucher

func (*Client) CommissionsEarned

func (c *Client) CommissionsEarned(ctx context.Context) (*CommissionsEarnedResponseBody, error)

Commission earned for user

func (*Client) CompetitionOptIn

func (c *Client) CompetitionOptIn(ctx context.Context, body CompetitionOptInRequest) error

Opt in to competition

func (*Client) CompetitionOptInStatus

Check competition opt-in status

func (*Client) ConfirmWithdrawalAddress

Confirm Withdrawal Address

func (*Client) CreateAirdropAddress

Create Airdrop Address

func (*Client) CreateOrder

func (c *Client) CreateOrder(ctx context.Context, body CreateOrderRequest) (*CreateOrderResponseBody, error)

Create Order

func (*Client) CreateOrderBatch

Create Multiple Orders

Orders are processed sequentially and returned in the same order as the input requests.

func (*Client) CreatePerpTransfer

Create Perpetual Transfer

func (c *Client) CreateReferralLink(ctx context.Context) (*CreateReferralLinkResponseBody, error)

Create Referral Link

Create a referral link for the user

func (*Client) CreateSimpleOrder

Create Simple Order

func (*Client) CreateSubaccount

Create Subaccount

func (*Client) CreateTransfer

Create Transfer

func (*Client) CreateTriggerOrder

Create Trigger Order

func (*Client) CreateWithdrawalAddress

Create Withdrawal Address

func (*Client) DeletePriceAlert

func (c *Client) DeletePriceAlert(ctx context.Context, params DeletePriceAlertParams) error

Delete Price Alert

func (*Client) DeleteSubaccount

func (c *Client) DeleteSubaccount(ctx context.Context, subaccountId int) error

Delete Subaccount

Deletes the specified subaccount by ID

func (*Client) DeleteWithdrawalAddress

func (c *Client) DeleteWithdrawalAddress(ctx context.Context, id int) (*DeleteWithdrawalAddressResponseBody, error)

Delete Withdrawal Address

func (*Client) DexPrice

func (c *Client) DexPrice(ctx context.Context, params DexPriceParams) (*DexPriceResponseBody, error)

Get 0x allowance holder price

Proxies the 0x Allowance Holder price endpoint with Arkham's affiliate fee configuration.

func (*Client) DexQuote

func (c *Client) DexQuote(ctx context.Context, params DexQuoteParams) (*DexQuoteResponseBody, error)

Get 0x allowance holder quote

Proxies the 0x Allowance Holder firm quote endpoint with Arkham's affiliate fee configuration.

func (*Client) DexSubmit

func (c *Client) DexSubmit(ctx context.Context, body DexSubmitRequest) error

Submit DEX Trade

Record a submitted DEX trade by ZID. Anonymous requests are stored without a user association when authentication is not present.

func (*Client) DexTradeHistory

func (c *Client) DexTradeHistory(ctx context.Context, params DexTradeHistoryParams) (*DexTradeHistoryResponseBody, error)

Get confirmed DEX trades

Returns confirmed DEX trades for a taker address.

func (*Client) GetAccountAirdrops

func (c *Client) GetAccountAirdrops(ctx context.Context, params GetAccountAirdropsParams) (*GetAccountAirdropsResponseBody, error)

Get Airdrops

Get the user's airdrops

func (*Client) GetAccountBalanceUpdates

Get Balance Updates

Get the user's balance updates

func (*Client) GetAccountCommissions

Get Commissions

Get the user's commissions

func (*Client) GetAccountDeposits

func (c *Client) GetAccountDeposits(ctx context.Context, params GetAccountDepositsParams) (*GetAccountDepositsResponseBody, error)

Get Deposits

func (*Client) GetAccountLspAssignments

Get LSP Assignments

Get the user's lsp assignments

func (*Client) GetAccountPositionUpdates

Get Position Updates

Get the user's position updates

func (*Client) GetAccountRealizedPnl

Get Realized PnL

Get the user's realized pnl

func (*Client) GetAccountRebates

func (c *Client) GetAccountRebates(ctx context.Context, params GetAccountRebatesParams) (*GetAccountRebatesResponseBody, error)

Get Rebates

Get the user's rebates

func (*Client) GetAccountTransfers

func (c *Client) GetAccountTransfers(ctx context.Context, params GetAccountTransfersParams) (*GetAccountTransfersResponseBody, error)

Get Transfers

func (*Client) GetAccountWatchlist

func (c *Client) GetAccountWatchlist(ctx context.Context) (*GetAccountWatchlistResponseBody, error)

Get Watchlist

Get a list of the pairs in your watchlist

func (*Client) GetAccountWithdrawals

Get Withdrawals

func (*Client) GetActiveSessions

func (c *Client) GetActiveSessions(ctx context.Context) (*GetActiveSessionsResponseBody, error)

Get Active Sessions

Get the user's active sessions

func (*Client) GetAirdropAddress

func (c *Client) GetAirdropAddress(ctx context.Context) (*GetAirdropAddressResponseBody, error)

Get Airdrop Address

func (*Client) GetAirdropClaim

func (c *Client) GetAirdropClaim(ctx context.Context) (*GetAirdropClaimResponseBody, error)

Get Airdrop Claim

func (*Client) GetAlerts

func (c *Client) GetAlerts(ctx context.Context) (*GetAlertsResponseBody, error)

Get Alerts

func (*Client) GetAllBalances

func (c *Client) GetAllBalances(ctx context.Context) (*GetAllBalancesResponseBody, error)

Get Balances across all subaccounts

Get the user's current balances across all subaccounts

func (*Client) GetAllMargin

func (c *Client) GetAllMargin(ctx context.Context) (*GetAllMarginResponseBody, error)

Get Account Margin across all subaccounts

Get the user's current margin usage details

func (*Client) GetAllOrdersByClientOrderId

Get all order for Client Order Id

func (*Client) GetAnnouncements

func (c *Client) GetAnnouncements(ctx context.Context, params GetAnnouncementsParams) (*GetAnnouncementsResponseBody, error)

Get Announcements

Get announcements for a specific locale

func (*Client) GetAssets

func (c *Client) GetAssets(ctx context.Context) (*GetAssetsResponseBody, error)

Get Assets

func (*Client) GetBalances

func (c *Client) GetBalances(ctx context.Context, params GetBalancesParams) (*GetBalancesResponseBody, error)

Get Balances

Get the user's current balances

func (*Client) GetBook

func (c *Client) GetBook(ctx context.Context, params GetBookParams) (*GetBookResponseBody, error)

Get Book

func (*Client) GetCandles

func (c *Client) GetCandles(ctx context.Context, params GetCandlesParams) (*GetCandlesResponseBody, error)

Get Candles

func (*Client) GetChains

func (c *Client) GetChains(ctx context.Context) (*GetChainsResponseBody, error)

Get Chains

func (*Client) GetContracts

func (c *Client) GetContracts(ctx context.Context) (*GetContractsResponseBody, error)

Get Contracts

func (*Client) GetDepositAddresses

func (c *Client) GetDepositAddresses(ctx context.Context, params GetDepositAddressesParams) (*GetDepositAddressesResponseBody, error)

Get Deposit Addresses

func (*Client) GetDexTokenList

func (c *Client) GetDexTokenList(ctx context.Context) (*GetDexTokenListResponseBody, error)

Get DEX token list

Returns a list of supported tokens for the DEX

func (*Client) GetFundingRatePayments

Get Funding Rate Payments

Get the user's funding rate payments

func (*Client) GetIndexPrice

func (c *Client) GetIndexPrice(ctx context.Context, params GetIndexPriceParams) (*GetIndexPriceResponseBody, error)

Get Index Price

func (*Client) GetIndexPrices

func (c *Client) GetIndexPrices(ctx context.Context) (*GetIndexPricesResponseBody, error)

Get Index Prices

func (*Client) GetL1Book

func (c *Client) GetL1Book(ctx context.Context, params GetL1BookParams) (*GetL1BookResponseBody, error)

Get L1 Book

func (*Client) GetLiquidationPrice

func (c *Client) GetLiquidationPrice(ctx context.Context, params GetLiquidationPriceParams) (*GetLiquidationPriceResponseBody, error)

Get Liquidation Price

Get liquidation price for a perpetual position

func (*Client) GetMargin

func (c *Client) GetMargin(ctx context.Context, params GetMarginParams) (*GetMarginResponseBody, error)

Get Account Margin

Get the user's current margin usage details

func (*Client) GetMarginSchedules

func (c *Client) GetMarginSchedules(ctx context.Context) (*GetMarginSchedulesResponseBody, error)

Get Margin Schedules

func (*Client) GetMarketCapChart

func (c *Client) GetMarketCapChart(ctx context.Context) (*GetMarketCapChartResponseBody, error)

Get MarketCap Chart

func (*Client) GetMarketCaps

func (c *Client) GetMarketCaps(ctx context.Context) (*GetMarketCapsResponseBody, error)

Get Market Caps

func (*Client) GetNotifications

func (c *Client) GetNotifications(ctx context.Context, params GetNotificationsParams) (*GetNotificationsResponseBody, error)

Get Notifications

func (*Client) GetOpenOrderByClientOrderId

Get Open Order By Client Order Id

func (*Client) GetOrderById

func (c *Client) GetOrderById(ctx context.Context, id int, params GetOrderByIdParams) (*GetOrderByIdResponseBody, error)

Get Order By Id

func (*Client) GetOrderHistory

func (c *Client) GetOrderHistory(ctx context.Context, params GetOrderHistoryParams) (*GetOrderHistoryResponseBody, error)

Get Order History

func (*Client) GetOrderHistoryWithTotal

Get Total Orders

func (*Client) GetOrders

func (c *Client) GetOrders(ctx context.Context, params GetOrdersParams) (*GetOrdersResponseBody, error)

Get Orders

func (*Client) GetPair

func (c *Client) GetPair(ctx context.Context, params GetPairParams) (*GetPairResponseBody, error)

Get Pair

func (*Client) GetPairs

func (c *Client) GetPairs(ctx context.Context) (*GetPairsResponseBody, error)

Get Pairs

func (*Client) GetPortfolioBalanceHistory

Get User Subaccount Balance History

Get the balance history for a subaccount

func (*Client) GetPositionLeverage

func (c *Client) GetPositionLeverage(ctx context.Context, params GetPositionLeverageParams) (*GetPositionLeverageResponseBody, error)

Get Position Limits

Gets the user specified position leverage

func (*Client) GetPositions

func (c *Client) GetPositions(ctx context.Context, params GetPositionsParams) (*GetPositionsResponseBody, error)

Get Positions

Get list of the current positions

func (*Client) GetPriceAlert

func (c *Client) GetPriceAlert(ctx context.Context, params GetPriceAlertParams) (*GetPriceAlertResponseBody, error)

Get Price Alerts

func (*Client) GetPublicTrades

func (c *Client) GetPublicTrades(ctx context.Context, params GetPublicTradesParams) (*GetPublicTradesResponseBody, error)

Get Public Trades

func (c *Client) GetReferralLinks(ctx context.Context) (*GetReferralLinksResponseBody, error)

Get Referral Links

Get the user's referral links

func (*Client) GetSubaccounts

func (c *Client) GetSubaccounts(ctx context.Context) (*GetSubaccountsResponseBody, error)

Get Subaccounts

func (*Client) GetTicker

func (c *Client) GetTicker(ctx context.Context, params GetTickerParams) (*GetTickerResponseBody, error)

Get Ticker

func (*Client) GetTickers

func (c *Client) GetTickers(ctx context.Context) (*GetTickersResponseBody, error)

Get Tickers

func (*Client) GetTriggerOrders

func (c *Client) GetTriggerOrders(ctx context.Context, params GetTriggerOrdersParams) (*GetTriggerOrdersResponseBody, error)

Get Trigger Orders

Get all trigger orders for the authenticated user.

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context) (*GetUserResponseBody, error)

Get User

func (*Client) GetUserFees

func (c *Client) GetUserFees(ctx context.Context) (*GetUserFeesResponseBody, error)

Get User Fees

Get the user's current trading fees

func (*Client) GetUserSettings

func (c *Client) GetUserSettings(ctx context.Context) (*GetUserSettingsResponseBody, error)

Get User Settings

func (*Client) GetUserTrades

func (c *Client) GetUserTrades(ctx context.Context, params GetUserTradesParams) (*GetUserTradesResponseBody, error)

Get User Trades

func (*Client) GetUserTradesByTime

func (c *Client) GetUserTradesByTime(ctx context.Context, params GetUserTradesByTimeParams) (*GetUserTradesByTimeResponseBody, error)

Get User Trades By Time

func (*Client) GetUserTradesWithTotals

Get User Trades History

func (*Client) GetWithdrawalAddress

func (c *Client) GetWithdrawalAddress(ctx context.Context, id int) (*GetWithdrawalAddressResponseBody, error)

Get Withdrawal Address

func (*Client) HandleDeleteSession

func (c *Client) HandleDeleteSession(ctx context.Context, body DeleteSessionRequest) error

Delete Session

Delete a session for the user

func (*Client) HandleReminderEmailUnsubscribe

func (c *Client) HandleReminderEmailUnsubscribe(ctx context.Context, params HandleReminderEmailUnsubscribeParams) error

Unsubscribe from Reminder Emails

Unsubscribe from reminder emails using the link from an email

func (*Client) HandleTerminateAll

func (c *Client) HandleTerminateAll(ctx context.Context) error

Terminate All Sessions

Terminate all sessions for the user

func (*Client) ListWithdrawalAddresses

func (c *Client) ListWithdrawalAddresses(ctx context.Context) (*ListWithdrawalAddressesResponseBody, error)

List Withdrawal Addresses

func (*Client) MarkReadNotifications

Mark Notifications Read

func (*Client) MinArkmLast30d

func (c *Client) MinArkmLast30d(ctx context.Context) (*MinArkmLast30dResponseBody, error)

Min ARKM last 30d for user

func (*Client) NewDepositAddress

Create Deposit Address

func (*Client) RealizedPnl

func (c *Client) RealizedPnl(ctx context.Context) (*RealizedPnlResponseBody, error)

Realized PnL for user

func (*Client) RebateBalance

func (c *Client) RebateBalance(ctx context.Context) (*RebateBalanceResponseBody, error)

Rebate balance for user

func (*Client) ReferralCount

func (c *Client) ReferralCount(ctx context.Context) (*ReferralCountResponseBody, error)

Referral count for user

func (*Client) RemoveFromWatchlist

func (c *Client) RemoveFromWatchlist(ctx context.Context, body RemoveFromWatchlistRequest) error

Remove from Watchlist

Remove a pair from your watchlise

func (*Client) RewardsInfo

func (c *Client) RewardsInfo(ctx context.Context) (*RewardsInfoResponseBody, error)

Rewards info

func (*Client) ServerTime

func (c *Client) ServerTime(ctx context.Context) (*ServerTimeResponseBody, error)

Get Server Time

func (*Client) SetPositionLeverage

func (c *Client) SetPositionLeverage(ctx context.Context, body SetPositionLeverageRequest) error

Get Position Limits

Sets the user specified position leverage for a given pair

func (*Client) SetPriceAlert

func (c *Client) SetPriceAlert(ctx context.Context, params SetPriceAlertParams, body SetPriceAlertRequest) error

Set Price Alert

func (*Client) TradingVolumeStats

func (c *Client) TradingVolumeStats(ctx context.Context) (*TradingVolumeStatsResponseBody, error)

Trading volume stats for user

func (*Client) UpdatePortfolioSettings

Update Portfolio Settings

func (*Client) UpdateReferralLinkSlug

func (c *Client) UpdateReferralLinkSlug(ctx context.Context, id string, body UpdateReferralLinkSlugRequest) error

Update Referral Link Slug

Update the slug for a referral link

func (*Client) UpdateSubaccount

func (c *Client) UpdateSubaccount(ctx context.Context, body UpdateSubaccountRequest) error

Update Subaccount

func (*Client) UpdateUserSettings

Update User Settings

func (*Client) UpdateWithdrawalAddressLabel

Update Withdrawal Address Label

func (*Client) UserPoints

func (c *Client) UserPoints(ctx context.Context) (*UserPointsResponseBody, error)

Points leaderboard for user

func (*Client) UserPointsSeason1

func (c *Client) UserPointsSeason1(ctx context.Context) (*UserPointsSeason1ResponseBody, error)

Points leaderboard season 1 for user

func (*Client) UserPointsSeason2

func (c *Client) UserPointsSeason2(ctx context.Context) (*UserPointsSeason2ResponseBody, error)

Points leaderboard season 2 for user

func (*Client) UserReferralsSeason1

func (c *Client) UserReferralsSeason1(ctx context.Context) (*UserReferralsSeason1ResponseBody, error)

Referrals leaderboard season 1 for user

func (*Client) UserReferralsSeason2

func (c *Client) UserReferralsSeason2(ctx context.Context) (*UserReferralsSeason2ResponseBody, error)

Referrals leaderboard season 2 for user

func (*Client) UserVolumeSeason1

func (c *Client) UserVolumeSeason1(ctx context.Context) (*UserVolumeSeason1ResponseBody, error)

Volume leaderboard season 1 for user

func (*Client) UserVolumeSeason2

func (c *Client) UserVolumeSeason2(ctx context.Context) (*UserVolumeSeason2ResponseBody, error)

Volume leaderboard season 2 for user

func (*Client) Vouchers

func (c *Client) Vouchers(ctx context.Context, params VouchersParams) (*VouchersResponseBody, error)

Vouchers for user

type Commission

type Commission struct {
	Amount       string `json:"amount"`
	AssetSymbol  string `json:"assetSymbol"`
	Id           int    `json:"id"`
	SubaccountId int    `json:"subaccountId"`

	// Time Time in microseconds since unix epoch
	Time   int `json:"time"`
	UserId int `json:"userId"`
}

Commission defines model for Commission.

type CommissionsEarnedResponseBody

type CommissionsEarnedResponseBody = string

CommissionsEarnedResponseBody defines body from CommissionsEarned response

type CompetitionOptInJSONRequestBody

type CompetitionOptInJSONRequestBody = CompetitionOptInRequest

CompetitionOptInJSONRequestBody defines body for CompetitionOptIn for application/json ContentType.

type CompetitionOptInRequest

type CompetitionOptInRequest struct {
	CompetitionId int `json:"competition_id"`
}

CompetitionOptInRequest defines model for CompetitionOptInRequest.

type CompetitionOptInStatusParams

type CompetitionOptInStatusParams struct {
	CompetitionId int `form:"competition_id,omitempty" json:"competition_id,omitempty,omitzero"`
}

CompetitionOptInStatusParams defines parameters for CompetitionOptInStatus.

type CompetitionOptInStatusResponseBody

type CompetitionOptInStatusResponseBody = bool

CompetitionOptInStatusResponseBody defines body from CompetitionOptInStatus response

type Config

type Config struct {
	// Optional KeyPair for signing requests, required for authenticated endpoints
	KeyPair *KeyPair

	// Optional ApiURL to override the server URL provided during client creation
	ApiURL string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains or telemetry.
	Client HttpRequestDoer

	// Optional WebSocket URL
	WebsocketURL string

	// Optional error handler for errors reading data from the websocket (default: panic on error)
	OnWebsocketReaderError func(err error)
}

Config contains configuration settings for creating a new client.

func (*Config) LoadFromEnv

func (c *Config) LoadFromEnv() error

type ConfirmWithdrawalAddressJSONRequestBody

type ConfirmWithdrawalAddressJSONRequestBody = ConfirmWithdrawalAddressRequest

ConfirmWithdrawalAddressJSONRequestBody defines body for ConfirmWithdrawalAddress for application/json ContentType.

type ConfirmWithdrawalAddressRequest

type ConfirmWithdrawalAddressRequest struct {
	Code UUID `json:"code"`
}

ConfirmWithdrawalAddressRequest defines model for ConfirmWithdrawalAddressRequest.

type ConfirmWithdrawalAddressResponseBody

type ConfirmWithdrawalAddressResponseBody = string

ConfirmWithdrawalAddressResponseBody defines body from ConfirmWithdrawalAddress response

type CreateAirdropAddressJSONRequestBody

type CreateAirdropAddressJSONRequestBody = CreateAirdropAddressRequest

CreateAirdropAddressJSONRequestBody defines body for CreateAirdropAddress for application/json ContentType.

type CreateAirdropAddressRequest

type CreateAirdropAddressRequest struct {
	Address string `json:"address"`
}

CreateAirdropAddressRequest defines model for CreateAirdropAddressRequest.

type CreateAirdropAddressResponseBody

type CreateAirdropAddressResponseBody = string

CreateAirdropAddressResponseBody defines body from CreateAirdropAddress response

type CreateApiKeyRequest

type CreateApiKeyRequest struct {
	IpWhitelist []string `json:"ipWhitelist"`
	Name        string   `json:"name"`
	Read        bool     `json:"read"`
	Write       bool     `json:"write"`
}

CreateApiKeyRequest defines model for CreateApiKeyRequest.

type CreateOrderBatchJSONRequestBody

type CreateOrderBatchJSONRequestBody = CreateOrdersBatchRequest

CreateOrderBatchJSONRequestBody defines body for CreateOrderBatch for application/json ContentType.

type CreateOrderBatchResponseBody

type CreateOrderBatchResponseBody = CreateOrdersBatchResponse

CreateOrderBatchResponseBody defines body from CreateOrderBatch response

type CreateOrderJSONRequestBody

type CreateOrderJSONRequestBody = CreateOrderRequest

CreateOrderJSONRequestBody defines body for CreateOrder for application/json ContentType.

type CreateOrderRequest

type CreateOrderRequest struct {
	ClientOrderId string `json:"clientOrderId,omitzero"`

	// PostOnly if true, the order will be closed if it can be matched immediately. Only supported on limit gtc orders.
	PostOnly bool `json:"postOnly,omitempty,omitzero"`

	// Price limit price, 0 for market orders
	Price string `json:"price,omitempty,omitzero"`

	// ReduceOnly if true, the order will only reduce the position size.
	ReduceOnly   bool      `json:"reduceOnly,omitempty,omitzero"`
	Side         OrderSide `json:"side"`
	Size         string    `json:"size"`
	SubaccountId int       `json:"subaccountId,omitempty,omitzero"`
	Symbol       string    `json:"symbol"`
	Type         OrderType `json:"type"`
}

CreateOrderRequest defines model for CreateOrderRequest.

type CreateOrderResponse

type CreateOrderResponse struct {
	ClientOrderId string    `json:"clientOrderId,omitempty,omitzero"`
	OrderId       int       `json:"orderId"`
	Price         string    `json:"price"`
	Side          OrderSide `json:"side"`
	Size          string    `json:"size"`
	SubaccountId  int       `json:"subaccountId"`
	Symbol        string    `json:"symbol"`

	// Time Time in microseconds since unix epoch
	Time int       `json:"time"`
	Type OrderType `json:"type"`
}

CreateOrderResponse defines model for CreateOrderResponse.

type CreateOrderResponseBody

type CreateOrderResponseBody = CreateOrderResponse

CreateOrderResponseBody defines body from CreateOrder response

type CreateOrdersBatchRequest

type CreateOrdersBatchRequest struct {
	Orders []CreateOrderRequest `json:"orders"`
}

CreateOrdersBatchRequest defines model for CreateOrdersBatchRequest.

type CreateOrdersBatchResponse

type CreateOrdersBatchResponse struct {
	Orders []OrderBatchItem `json:"orders"`
}

CreateOrdersBatchResponse defines model for CreateOrdersBatchResponse.

type CreatePerpTransferJSONRequestBody

type CreatePerpTransferJSONRequestBody = CreatePerpTransferRequest

CreatePerpTransferJSONRequestBody defines body for CreatePerpTransfer for application/json ContentType.

type CreatePerpTransferRequest

type CreatePerpTransferRequest struct {
	FromSubaccountId int    `json:"fromSubaccountId"`
	Symbol           string `json:"symbol"`
	ToSubaccountId   int    `json:"toSubaccountId"`
}

CreatePerpTransferRequest defines model for CreatePerpTransferRequest.

type CreatePerpTransferResponse

type CreatePerpTransferResponse struct {
	TransferId int `json:"transferId"`
}

CreatePerpTransferResponse defines model for CreatePerpTransferResponse.

type CreatePerpTransferResponseBody

type CreatePerpTransferResponseBody = CreatePerpTransferResponse

CreatePerpTransferResponseBody defines body from CreatePerpTransfer response

type CreateReferralLinkResponseBody

type CreateReferralLinkResponseBody = ReferralLinkResponse

CreateReferralLinkResponseBody defines body from CreateReferralLink response

type CreateSimpleOrderJSONRequestBody

type CreateSimpleOrderJSONRequestBody = CreateSimpleOrderRequest

CreateSimpleOrderJSONRequestBody defines body for CreateSimpleOrder for application/json ContentType.

type CreateSimpleOrderRequest

type CreateSimpleOrderRequest struct {
	Side         OrderSide `json:"side"`
	Size         string    `json:"size"`
	SubaccountId int       `json:"subaccountId"`
	Symbol       string    `json:"symbol"`
}

CreateSimpleOrderRequest defines model for CreateSimpleOrderRequest.

type CreateSimpleOrderResponseBody

type CreateSimpleOrderResponseBody = CreateOrderResponse

CreateSimpleOrderResponseBody defines body from CreateSimpleOrder response

type CreateSubaccountJSONRequestBody

type CreateSubaccountJSONRequestBody = CreateSubaccountRequest

CreateSubaccountJSONRequestBody defines body for CreateSubaccount for application/json ContentType.

type CreateSubaccountRequest

type CreateSubaccountRequest struct {
	Name string `json:"name"`
}

CreateSubaccountRequest defines model for CreateSubaccountRequest.

type CreateSubaccountResponse

type CreateSubaccountResponse struct {
	Id int `json:"id"`
}

CreateSubaccountResponse defines model for CreateSubaccountResponse.

type CreateSubaccountResponseBody

type CreateSubaccountResponseBody = CreateSubaccountResponse

CreateSubaccountResponseBody defines body from CreateSubaccount response

type CreateTransferJSONRequestBody

type CreateTransferJSONRequestBody = CreateTransferRequest

CreateTransferJSONRequestBody defines body for CreateTransfer for application/json ContentType.

type CreateTransferRequest

type CreateTransferRequest struct {
	Amount           string `json:"amount"`
	FromSubaccountId int    `json:"fromSubaccountId"`
	Symbol           string `json:"symbol"`
	ToSubaccountId   int    `json:"toSubaccountId"`
}

CreateTransferRequest defines model for CreateTransferRequest.

type CreateTransferResponse

type CreateTransferResponse struct {
	TransferId int `json:"transferId"`
}

CreateTransferResponse defines model for CreateTransferResponse.

type CreateTransferResponseBody

type CreateTransferResponseBody = CreateTransferResponse

CreateTransferResponseBody defines body from CreateTransfer response

type CreateTriggerOrderJSONRequestBody

type CreateTriggerOrderJSONRequestBody = CreateTriggerOrderRequest

CreateTriggerOrderJSONRequestBody defines body for CreateTriggerOrder for application/json ContentType.

type CreateTriggerOrderRequest

type CreateTriggerOrderRequest struct {
	ClientOrderId string `json:"clientOrderId,omitzero"`

	// PostOnly if true, the order will be closed if it can be matched immediately. Only supported on limit gtc orders.
	PostOnly bool `json:"postOnly,omitempty,omitzero"`

	// Price limit price, 0 for market orders
	Price string `json:"price,omitempty,omitzero"`

	// ReduceOnly if true, the order will only reduce the position size.
	ReduceOnly       bool             `json:"reduceOnly,omitempty,omitzero"`
	Side             OrderSide        `json:"side"`
	Size             string           `json:"size"`
	SubaccountId     int              `json:"subaccountId,omitempty,omitzero"`
	Symbol           string           `json:"symbol"`
	TriggerPrice     string           `json:"triggerPrice"`
	TriggerPriceType TriggerPriceType `json:"triggerPriceType"`
	TriggerType      TriggerType      `json:"triggerType"`
	Type             OrderType        `json:"type"`
}

CreateTriggerOrderRequest defines model for CreateTriggerOrderRequest.

type CreateTriggerOrderResponse

type CreateTriggerOrderResponse struct {
	Price          string    `json:"price"`
	Side           OrderSide `json:"side"`
	Size           string    `json:"size"`
	Symbol         string    `json:"symbol"`
	TriggerOrderId int       `json:"triggerOrderId"`
	Type           OrderType `json:"type"`
}

CreateTriggerOrderResponse defines model for CreateTriggerOrderResponse.

type CreateTriggerOrderResponseBody

type CreateTriggerOrderResponseBody = CreateTriggerOrderResponse

CreateTriggerOrderResponseBody defines body from CreateTriggerOrder response

type CreateWithdrawalAddressJSONRequestBody

type CreateWithdrawalAddressJSONRequestBody = CreateWithdrawalAddressRequest

CreateWithdrawalAddressJSONRequestBody defines body for CreateWithdrawalAddress for application/json ContentType.

type CreateWithdrawalAddressRequest

type CreateWithdrawalAddressRequest struct {
	Address string `json:"address"`
	Chain   string `json:"chain"`
	Label   string `json:"label"`
	Memo    int    `json:"memo,omitzero"`
}

CreateWithdrawalAddressRequest defines model for CreateWithdrawalAddressRequest.

type CreateWithdrawalAddressResponseBody

type CreateWithdrawalAddressResponseBody = int

CreateWithdrawalAddressResponseBody defines body from CreateWithdrawalAddress response

type DeletePriceAlertParams

type DeletePriceAlertParams struct {
	SubaccountId int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Symbol       string `form:"symbol,omitempty" json:"symbol,omitempty,omitzero"`
}

DeletePriceAlertParams defines parameters for DeletePriceAlert.

type DeleteSessionRequest

type DeleteSessionRequest struct {
	SessionId int `json:"sessionId"`
}

DeleteSessionRequest defines model for DeleteSessionRequest.

type DeleteWithdrawalAddressResponseBody

type DeleteWithdrawalAddressResponseBody = string

DeleteWithdrawalAddressResponseBody defines body from DeleteWithdrawalAddress response

type Deposit

type Deposit struct {
	Amount         string `json:"amount"`
	Chain          string `json:"chain"`
	Confirmed      bool   `json:"confirmed"`
	DepositAddress string `json:"depositAddress"`
	Id             int    `json:"id"`
	Price          string `json:"price"`
	Symbol         string `json:"symbol"`

	// Time Time in microseconds since unix epoch
	Time            int    `json:"time"`
	TransactionHash string `json:"transactionHash"`
}

Deposit defines model for Deposit.

type DepositAddressesResponse

type DepositAddressesResponse struct {
	Addresses []string `json:"addresses"`
}

DepositAddressesResponse defines model for DepositAddressesResponse.

type DexPriceParams

type DexPriceParams struct {
	ChainId     int    `form:"chainId,omitempty" json:"chainId,omitempty,omitzero"`
	SellToken   string `form:"sellToken,omitempty" json:"sellToken,omitempty,omitzero"`
	BuyToken    string `form:"buyToken,omitempty" json:"buyToken,omitempty,omitzero"`
	SellAmount  string `form:"sellAmount,omitempty" json:"sellAmount,omitempty,omitzero"`
	Taker       string `form:"taker,omitempty" json:"taker,omitempty,omitzero"`
	SlippageBps int    `form:"slippageBps,omitempty" json:"slippageBps,omitempty,omitzero"`
}

DexPriceParams defines parameters for DexPrice.

type DexPriceResponseBody

type DexPriceResponseBody = AllowanceHolderBaseResponse

DexPriceResponseBody defines body from DexPrice response

type DexQuoteParams

type DexQuoteParams struct {
	ChainId     int    `form:"chainId,omitempty" json:"chainId,omitempty,omitzero"`
	SellToken   string `form:"sellToken,omitempty" json:"sellToken,omitempty,omitzero"`
	BuyToken    string `form:"buyToken,omitempty" json:"buyToken,omitempty,omitzero"`
	SellAmount  string `form:"sellAmount,omitempty" json:"sellAmount,omitempty,omitzero"`
	Taker       string `form:"taker,omitempty" json:"taker,omitempty,omitzero"`
	SlippageBps int    `form:"slippageBps,omitempty" json:"slippageBps,omitempty,omitzero"`
}

DexQuoteParams defines parameters for DexQuote.

type DexQuoteResponseBody

type DexQuoteResponseBody = AllowanceHolderBaseResponse

DexQuoteResponseBody defines body from DexQuote response

type DexSubmitJSONRequestBody

type DexSubmitJSONRequestBody = DexSubmitRequest

DexSubmitJSONRequestBody defines body for DexSubmit for application/json ContentType.

type DexSubmitRequest

type DexSubmitRequest struct {
	Zid string `json:"zid"`
}

DexSubmitRequest defines model for DexSubmitRequest.

type DexToken

type DexToken struct {
	Address  string `json:"address"`
	ChainId  int    `json:"chainId"`
	Decimals int    `json:"decimals"`
	LogoURI  string `json:"logoURI,omitzero"`
	Name     string `json:"name"`
	Symbol   string `json:"symbol"`
}

DexToken defines model for DexToken.

type DexTradeHistoryItem

type DexTradeHistoryItem struct {
	BuyAmount        string    `json:"buyAmount,omitempty,omitzero"`
	BuyTokenAddress  string    `json:"buyTokenAddress,omitzero"`
	BuyTokenName     string    `json:"buyTokenName,omitzero"`
	ChainId          int       `json:"chainId,omitzero"`
	IntegratorFeeUsd string    `json:"integratorFeeUsd,omitempty,omitzero"`
	SellAmount       string    `json:"sellAmount,omitempty,omitzero"`
	SellTokenAddress string    `json:"sellTokenAddress,omitzero"`
	SellTokenName    string    `json:"sellTokenName,omitzero"`
	Taker            string    `json:"taker"`
	TradeTimestamp   time.Time `json:"tradeTimestamp"`
	TransactionHash  string    `json:"transactionHash,omitzero"`
	VolumeUsd        int       `json:"volumeUsd"`
	Zid              string    `json:"zid"`
}

DexTradeHistoryItem defines model for DexTradeHistoryItem.

type DexTradeHistoryParams

type DexTradeHistoryParams struct {
	Address string `form:"address,omitempty" json:"address,omitempty,omitzero"`
	ChainId int    `form:"chainId,omitempty" json:"chainId,omitempty,omitzero"`
	Limit   int    `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

DexTradeHistoryParams defines parameters for DexTradeHistory.

type DexTradeHistoryResponseBody

type DexTradeHistoryResponseBody = []DexTradeHistoryItem

DexTradeHistoryResponseBody defines body from DexTradeHistory response

type Error

type Error struct {
	// Id The unique identifier for the error
	Id ErrorId `json:"id"`

	// Message Additional details about the error
	Message string `json:"message"`

	// Name The name of the error
	Name ErrorName `json:"name"`
}

Error defines model for Error.

func (*Error) Error

func (e *Error) Error() string

type ErrorCode

type ErrorCode int

ErrorCode defines model for ErrorCode.

const (
	ErrorCodeBadRequest        ErrorCode = 1
	ErrorCodeChannelRequired   ErrorCode = 8
	ErrorCodeForbidden         ErrorCode = 13
	ErrorCodeInternalError     ErrorCode = 0
	ErrorCodeInvalidChannel    ErrorCode = 7
	ErrorCodeInvalidGroup      ErrorCode = 10
	ErrorCodeInvalidMethod     ErrorCode = 5
	ErrorCodeInvalidSymbol     ErrorCode = 3
	ErrorCodeMethodRequired    ErrorCode = 6
	ErrorCodeRateLimitExceeded ErrorCode = 11
	ErrorCodeSymbolRequired    ErrorCode = 4
	ErrorCodeUnauthorized      ErrorCode = 2
)

Defines values for ErrorCode.

type ErrorId

type ErrorId int

ErrorId The unique identifier for the error

const (
	ErrorIdBadRequest                           ErrorId = 10001
	ErrorIdChangeEmailRequestRateLimited        ErrorId = 90011
	ErrorIdChannelRequired                      ErrorId = 20004
	ErrorIdClientOrderIdAlreadyExists           ErrorId = 30014
	ErrorIdClientOrderIdNotFound                ErrorId = 30015
	ErrorIdConflict                             ErrorId = 10024
	ErrorIdExpiredSignature                     ErrorId = 10018
	ErrorIdExpiresMissing                       ErrorId = 10015
	ErrorIdExpiresTooFar                        ErrorId = 10017
	ErrorIdFailedRiskCheck                      ErrorId = 40001
	ErrorIdForbidden                            ErrorId = 10006
	ErrorIdFuturesNotEnabled                    ErrorId = 40006
	ErrorIdIPNotAllowed                         ErrorId = 10020
	ErrorIdInsufficientBalance                  ErrorId = 30010
	ErrorIdInsufficientLiquidity                ErrorId = 30013
	ErrorIdInternalError                        ErrorId = 10000
	ErrorIdInvalidAlertPriceType                ErrorId = 90002
	ErrorIdInvalidAlertType                     ErrorId = 90001
	ErrorIdInvalidBrokerId                      ErrorId = 30025
	ErrorIdInvalidCandleDuration                ErrorId = 90004
	ErrorIdInvalidChain                         ErrorId = 40005
	ErrorIdInvalidChannel                       ErrorId = 20003
	ErrorIdInvalidClientOrderID                 ErrorId = 30020
	ErrorIdInvalidEmail                         ErrorId = 90010
	ErrorIdInvalidGroup                         ErrorId = 20005
	ErrorIdInvalidIP                            ErrorId = 10007
	ErrorIdInvalidMFA                           ErrorId = 90007
	ErrorIdInvalidMethod                        ErrorId = 20001
	ErrorIdInvalidNotificationType              ErrorId = 90005
	ErrorIdInvalidNotional                      ErrorId = 30005
	ErrorIdInvalidOrderSide                     ErrorId = 30023
	ErrorIdInvalidOrderType                     ErrorId = 30024
	ErrorIdInvalidPair                          ErrorId = 30011
	ErrorIdInvalidPostOnly                      ErrorId = 30003
	ErrorIdInvalidPrice                         ErrorId = 30002
	ErrorIdInvalidReduceOnly                    ErrorId = 30004
	ErrorIdInvalidRole                          ErrorId = 90009
	ErrorIdInvalidSize                          ErrorId = 30001
	ErrorIdInvalidSymbol                        ErrorId = 10003
	ErrorIdInvalidTriggerPriceType              ErrorId = 30022
	ErrorIdInvalidTriggerType                   ErrorId = 30021
	ErrorIdInvalidVoucherStatus                 ErrorId = 90003
	ErrorIdInvalidWithdrawalAddress             ErrorId = 40003
	ErrorIdKeyNotPermitted                      ErrorId = 10009
	ErrorIdLspAssignmentGreaterThanMaxNotional  ErrorId = 40008
	ErrorIdLspMaxNotionalGreaterThanMarginLimit ErrorId = 40009
	ErrorIdLspMaxNotionalMustNotBeNegative      ErrorId = 40010
	ErrorIdMFA                                  ErrorId = 10021
	ErrorIdMemoNotSupported                     ErrorId = 40002
	ErrorIdMethodRequired                       ErrorId = 20002
	ErrorIdNegativeAmount                       ErrorId = 40012
	ErrorIdNoMarkPrice                          ErrorId = 30012
	ErrorIdNotFound                             ErrorId = 10025
	ErrorIdOrderIdNotFound                      ErrorId = 30028
	ErrorIdPairNotEnabled                       ErrorId = 30007
	ErrorIdParsingExpires                       ErrorId = 10016
	ErrorIdParsingKey                           ErrorId = 10010
	ErrorIdParsingRequest                       ErrorId = 10022
	ErrorIdPortfolioLiquidation                 ErrorId = 40011
	ErrorIdPositionLimit                        ErrorId = 30019
	ErrorIdPositionNotFound                     ErrorId = 40004
	ErrorIdPostOnly                             ErrorId = 30009
	ErrorIdRateLimitExceeded                    ErrorId = 10005
	ErrorIdReduceOnlyInvalid                    ErrorId = 30016
	ErrorIdRequiresRead                         ErrorId = 10012
	ErrorIdRequiresWrite                        ErrorId = 10013
	ErrorIdSignatureMismatch                    ErrorId = 10019
	ErrorIdSignatureMissing                     ErrorId = 10014
	ErrorIdSubaccountHasOpenFuturePositions     ErrorId = 40007
	ErrorIdSubaccountNotFound                   ErrorId = 10023
	ErrorIdSymbolRequired                       ErrorId = 10004
	ErrorIdThrottled                            ErrorId = 10008
	ErrorIdTooManyAttempts                      ErrorId = 90008
	ErrorIdTooManyMFAAttempts                   ErrorId = 90006
	ErrorIdTradingFreeze                        ErrorId = 30008
	ErrorIdUnauthorized                         ErrorId = 10002
	ErrorIdUnknownOrderType                     ErrorId = 30006
	ErrorIdUnsupportedAssetType                 ErrorId = 30018
	ErrorIdUnsupportedOrderSide                 ErrorId = 30017
	ErrorIdUserDeleted                          ErrorId = 30027
	ErrorIdUserFrozen                           ErrorId = 30026
	ErrorIdVerifyingKey                         ErrorId = 10011
	ErrorIdZeroAmount                           ErrorId = 40013
)

Defines values for ErrorId.

type ErrorName

type ErrorName string

ErrorName The name of the error

const (
	ErrorNameBadRequest                           ErrorName = "BadRequest"
	ErrorNameChangeEmailRequestRateLimited        ErrorName = "ChangeEmailRequestRateLimited"
	ErrorNameChannelRequired                      ErrorName = "ChannelRequired"
	ErrorNameClientOrderIdAlreadyExists           ErrorName = "ClientOrderIdAlreadyExists"
	ErrorNameClientOrderIdNotFound                ErrorName = "ClientOrderIdNotFound"
	ErrorNameConflict                             ErrorName = "Conflict"
	ErrorNameExpiredSignature                     ErrorName = "ExpiredSignature"
	ErrorNameExpiresMissing                       ErrorName = "ExpiresMissing"
	ErrorNameExpiresTooFar                        ErrorName = "ExpiresTooFar"
	ErrorNameFailedRiskCheck                      ErrorName = "FailedRiskCheck"
	ErrorNameForbidden                            ErrorName = "Forbidden"
	ErrorNameFuturesNotEnabled                    ErrorName = "FuturesNotEnabled"
	ErrorNameIPNotAllowed                         ErrorName = "IPNotAllowed"
	ErrorNameInsufficientBalance                  ErrorName = "InsufficientBalance"
	ErrorNameInsufficientLiquidity                ErrorName = "InsufficientLiquidity"
	ErrorNameInternalError                        ErrorName = "InternalError"
	ErrorNameInvalidAlertPriceType                ErrorName = "InvalidAlertPriceType"
	ErrorNameInvalidAlertType                     ErrorName = "InvalidAlertType"
	ErrorNameInvalidBrokerId                      ErrorName = "InvalidBrokerId"
	ErrorNameInvalidCandleDuration                ErrorName = "InvalidCandleDuration"
	ErrorNameInvalidChain                         ErrorName = "InvalidChain"
	ErrorNameInvalidChannel                       ErrorName = "InvalidChannel"
	ErrorNameInvalidClientOrderID                 ErrorName = "InvalidClientOrderID"
	ErrorNameInvalidEmail                         ErrorName = "InvalidEmail"
	ErrorNameInvalidGroup                         ErrorName = "InvalidGroup"
	ErrorNameInvalidIP                            ErrorName = "InvalidIP"
	ErrorNameInvalidMFA                           ErrorName = "InvalidMFA"
	ErrorNameInvalidMethod                        ErrorName = "InvalidMethod"
	ErrorNameInvalidNotificationType              ErrorName = "InvalidNotificationType"
	ErrorNameInvalidNotional                      ErrorName = "InvalidNotional"
	ErrorNameInvalidOrderSide                     ErrorName = "InvalidOrderSide"
	ErrorNameInvalidOrderType                     ErrorName = "InvalidOrderType"
	ErrorNameInvalidPair                          ErrorName = "InvalidPair"
	ErrorNameInvalidPostOnly                      ErrorName = "InvalidPostOnly"
	ErrorNameInvalidPrice                         ErrorName = "InvalidPrice"
	ErrorNameInvalidReduceOnly                    ErrorName = "InvalidReduceOnly"
	ErrorNameInvalidRole                          ErrorName = "InvalidRole"
	ErrorNameInvalidSize                          ErrorName = "InvalidSize"
	ErrorNameInvalidSymbol                        ErrorName = "InvalidSymbol"
	ErrorNameInvalidTriggerPriceType              ErrorName = "InvalidTriggerPriceType"
	ErrorNameInvalidTriggerType                   ErrorName = "InvalidTriggerType"
	ErrorNameInvalidVoucherStatus                 ErrorName = "InvalidVoucherStatus"
	ErrorNameInvalidWithdrawalAddress             ErrorName = "InvalidWithdrawalAddress"
	ErrorNameKeyNotPermitted                      ErrorName = "KeyNotPermitted"
	ErrorNameLspAssignmentGreaterThanMaxNotional  ErrorName = "LspAssignmentGreaterThanMaxNotional"
	ErrorNameLspMaxNotionalGreaterThanMarginLimit ErrorName = "LspMaxNotionalGreaterThanMarginLimit"
	ErrorNameLspMaxNotionalMustNotBeNegative      ErrorName = "LspMaxNotionalMustNotBeNegative"
	ErrorNameMFA                                  ErrorName = "MFA"
	ErrorNameMemoNotSupported                     ErrorName = "MemoNotSupported"
	ErrorNameMethodRequired                       ErrorName = "MethodRequired"
	ErrorNameNegativeAmount                       ErrorName = "NegativeAmount"
	ErrorNameNoMarkPrice                          ErrorName = "NoMarkPrice"
	ErrorNameNotFound                             ErrorName = "NotFound"
	ErrorNameOrderIdNotFound                      ErrorName = "OrderIdNotFound"
	ErrorNamePairNotEnabled                       ErrorName = "PairNotEnabled"
	ErrorNameParsingExpires                       ErrorName = "ParsingExpires"
	ErrorNameParsingKey                           ErrorName = "ParsingKey"
	ErrorNameParsingRequest                       ErrorName = "ParsingRequest"
	ErrorNamePortfolioLiquidation                 ErrorName = "PortfolioLiquidation"
	ErrorNamePositionLimit                        ErrorName = "PositionLimit"
	ErrorNamePositionNotFound                     ErrorName = "PositionNotFound"
	ErrorNamePostOnly                             ErrorName = "PostOnly"
	ErrorNameRateLimitExceeded                    ErrorName = "RateLimitExceeded"
	ErrorNameReduceOnlyInvalid                    ErrorName = "ReduceOnlyInvalid"
	ErrorNameRequiresRead                         ErrorName = "RequiresRead"
	ErrorNameRequiresWrite                        ErrorName = "RequiresWrite"
	ErrorNameSignatureMismatch                    ErrorName = "SignatureMismatch"
	ErrorNameSignatureMissing                     ErrorName = "SignatureMissing"
	ErrorNameSubaccountHasOpenFuturePositions     ErrorName = "SubaccountHasOpenFuturePositions"
	ErrorNameSubaccountNotFound                   ErrorName = "SubaccountNotFound"
	ErrorNameSymbolRequired                       ErrorName = "SymbolRequired"
	ErrorNameThrottled                            ErrorName = "Throttled"
	ErrorNameTooManyAttempts                      ErrorName = "TooManyAttempts"
	ErrorNameTooManyMFAAttempts                   ErrorName = "TooManyMFAAttempts"
	ErrorNameTradingFreeze                        ErrorName = "TradingFreeze"
	ErrorNameUnauthorized                         ErrorName = "Unauthorized"
	ErrorNameUnknownOrderType                     ErrorName = "UnknownOrderType"
	ErrorNameUnsupportedAssetType                 ErrorName = "UnsupportedAssetType"
	ErrorNameUnsupportedOrderSide                 ErrorName = "UnsupportedOrderSide"
	ErrorNameUserDeleted                          ErrorName = "UserDeleted"
	ErrorNameUserFrozen                           ErrorName = "UserFrozen"
	ErrorNameVerifyingKey                         ErrorName = "VerifyingKey"
	ErrorNameZeroAmount                           ErrorName = "ZeroAmount"
)

Defines values for ErrorName.

type Exchange

type Exchange string

Exchange defines model for Exchange.

const (
	ExchangeArkham       Exchange = "arkham"
	ExchangeBinance      Exchange = "binance"
	ExchangeBinanceUS    Exchange = "binance_us"
	ExchangeBitMart      Exchange = "bitmart"
	ExchangeBitget       Exchange = "bitget"
	ExchangeBybit        Exchange = "bybit"
	ExchangeCoinbase     Exchange = "coinbase"
	ExchangeCryptoDotCom Exchange = "crypto.com"
	ExchangeGateio       Exchange = "gateio"
	ExchangeGemini       Exchange = "gemini"
	ExchangeHtx          Exchange = "htx"
	ExchangeKraken       Exchange = "kraken"
	ExchangeKucoin       Exchange = "kucoin"
	ExchangeMexc         Exchange = "mexc"
	ExchangeOkx          Exchange = "okx"
)

Defines values for Exchange.

type FormDataAuthenticateRequest

type FormDataAuthenticateRequest struct {
	RedirectPath string `json:"redirectPath"`
	TradeInToken string `json:"tradeInToken"`
}

FormDataAuthenticateRequest defines model for FormDataAuthenticateRequest.

type FundingRatePayment

type FundingRatePayment struct {
	Amount       string `json:"amount"`
	AssetSymbol  string `json:"assetSymbol"`
	Id           int    `json:"id"`
	IndexPrice   string `json:"indexPrice"`
	PairSymbol   string `json:"pairSymbol"`
	SubaccountId int    `json:"subaccountId"`

	// Time Time in microseconds since unix epoch
	Time   int `json:"time"`
	UserId int `json:"userId"`
}

FundingRatePayment defines model for FundingRatePayment.

type GetAccountAirdropsParams

type GetAccountAirdropsParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit        int `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetAccountAirdropsParams defines parameters for GetAccountAirdrops.

type GetAccountAirdropsResponseBody

type GetAccountAirdropsResponseBody = []Airdrop

GetAccountAirdropsResponseBody defines body from GetAccountAirdrops response

type GetAccountBalanceUpdatesParams

type GetAccountBalanceUpdatesParams struct {
	SubaccountId int                  `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int                  `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Reason       PositionUpdateReason `form:"reason,omitempty" json:"reason,omitempty,omitzero"`
	Limit        int                  `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetAccountBalanceUpdatesParams defines parameters for GetAccountBalanceUpdates.

type GetAccountBalanceUpdatesResponseBody

type GetAccountBalanceUpdatesResponseBody = []BalanceUpdate

GetAccountBalanceUpdatesResponseBody defines body from GetAccountBalanceUpdates response

type GetAccountCommissionsParams

type GetAccountCommissionsParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit        int `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetAccountCommissionsParams defines parameters for GetAccountCommissions.

type GetAccountCommissionsResponseBody

type GetAccountCommissionsResponseBody = []Commission

GetAccountCommissionsResponseBody defines body from GetAccountCommissions response

type GetAccountDepositsParams

type GetAccountDepositsParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit        int `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetAccountDepositsParams defines parameters for GetAccountDeposits.

type GetAccountDepositsResponseBody

type GetAccountDepositsResponseBody = []Deposit

GetAccountDepositsResponseBody defines body from GetAccountDeposits response

type GetAccountLspAssignmentsParams

type GetAccountLspAssignmentsParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit        int `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetAccountLspAssignmentsParams defines parameters for GetAccountLspAssignments.

type GetAccountLspAssignmentsResponseBody

type GetAccountLspAssignmentsResponseBody = []LspAssignment

GetAccountLspAssignmentsResponseBody defines body from GetAccountLspAssignments response

type GetAccountPositionUpdatesParams

type GetAccountPositionUpdatesParams struct {
	SubaccountId int                  `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int                  `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Reason       PositionUpdateReason `form:"reason,omitempty" json:"reason,omitempty,omitzero"`
	Limit        int                  `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetAccountPositionUpdatesParams defines parameters for GetAccountPositionUpdates.

type GetAccountPositionUpdatesResponseBody

type GetAccountPositionUpdatesResponseBody = []PositionUpdate

GetAccountPositionUpdatesResponseBody defines body from GetAccountPositionUpdates response

type GetAccountRealizedPnlParams

type GetAccountRealizedPnlParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit        int `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetAccountRealizedPnlParams defines parameters for GetAccountRealizedPnl.

type GetAccountRealizedPnlResponseBody

type GetAccountRealizedPnlResponseBody = []RealizedPnl

GetAccountRealizedPnlResponseBody defines body from GetAccountRealizedPnl response

type GetAccountRebatesParams

type GetAccountRebatesParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit        int `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetAccountRebatesParams defines parameters for GetAccountRebates.

type GetAccountRebatesResponseBody

type GetAccountRebatesResponseBody = []Rebate

GetAccountRebatesResponseBody defines body from GetAccountRebates response

type GetAccountTransfersParams

type GetAccountTransfersParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit        int `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetAccountTransfersParams defines parameters for GetAccountTransfers.

type GetAccountTransfersResponseBody

type GetAccountTransfersResponseBody = []Transfer

GetAccountTransfersResponseBody defines body from GetAccountTransfers response

type GetAccountWatchlistResponseBody

type GetAccountWatchlistResponseBody = []string

GetAccountWatchlistResponseBody defines body from GetAccountWatchlist response

type GetAccountWithdrawalsParams

type GetAccountWithdrawalsParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit        int `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetAccountWithdrawalsParams defines parameters for GetAccountWithdrawals.

type GetAccountWithdrawalsResponseBody

type GetAccountWithdrawalsResponseBody = []Withdrawal

GetAccountWithdrawalsResponseBody defines body from GetAccountWithdrawals response

type GetActiveSessionsResponseBody

type GetActiveSessionsResponseBody = SessionsResponse

GetActiveSessionsResponseBody defines body from GetActiveSessions response

type GetAirdropAddressResponseBody

type GetAirdropAddressResponseBody = string

GetAirdropAddressResponseBody defines body from GetAirdropAddress response

type GetAirdropClaimResponseBody

type GetAirdropClaimResponseBody = AirdropClaim

GetAirdropClaimResponseBody defines body from GetAirdropClaim response

type GetAlertsResponseBody

type GetAlertsResponseBody = []Alert

GetAlertsResponseBody defines body from GetAlerts response

type GetAllBalancesResponseBody

type GetAllBalancesResponseBody = []Balance

GetAllBalancesResponseBody defines body from GetAllBalances response

type GetAllMarginResponseBody

type GetAllMarginResponseBody = []Margin

GetAllMarginResponseBody defines body from GetAllMargin response

type GetAllOrdersByClientOrderIdParams

type GetAllOrdersByClientOrderIdParams struct {
	SubaccountId  int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	ClientOrderId string `form:"clientOrderId,omitempty" json:"clientOrderId,omitempty,omitzero"`
}

GetAllOrdersByClientOrderIdParams defines parameters for GetAllOrdersByClientOrderId.

type GetAllOrdersByClientOrderIdResponseBody

type GetAllOrdersByClientOrderIdResponseBody = []Order

GetAllOrdersByClientOrderIdResponseBody defines body from GetAllOrdersByClientOrderId response

type GetAnnouncementsParams

type GetAnnouncementsParams struct {
	Locale Locale `form:"locale" json:"locale"`
}

GetAnnouncementsParams defines parameters for GetAnnouncements.

type GetAnnouncementsResponseBody

type GetAnnouncementsResponseBody = []Announcement

GetAnnouncementsResponseBody defines body from GetAnnouncements response

type GetAssetsResponseBody

type GetAssetsResponseBody = []Asset

GetAssetsResponseBody defines body from GetAssets response

type GetBalancesParams

type GetBalancesParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
}

GetBalancesParams defines parameters for GetBalances.

type GetBalancesResponseBody

type GetBalancesResponseBody = []Balance

GetBalancesResponseBody defines body from GetBalances response

type GetBookParams

type GetBookParams struct {
	Symbol string `form:"symbol" json:"symbol"`
	Limit  int    `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetBookParams defines parameters for GetBook.

type GetBookResponseBody

type GetBookResponseBody = OrderBook

GetBookResponseBody defines body from GetBook response

type GetCandlesParams

type GetCandlesParams struct {
	Symbol   string         `form:"symbol" json:"symbol"`
	Duration CandleDuration `form:"duration" json:"duration"`

	// Start Time in microseconds since unix epoch
	Start int `form:"start" json:"start"`

	// End Time in microseconds since unix epoch
	End int `form:"end" json:"end"`
}

GetCandlesParams defines parameters for GetCandles.

type GetCandlesResponseBody

type GetCandlesResponseBody = []Candle

GetCandlesResponseBody defines body from GetCandles response

type GetChainsResponseBody

type GetChainsResponseBody = []Blockchain

GetChainsResponseBody defines body from GetChains response

type GetContractsResponseBody

type GetContractsResponseBody = []Ticker

GetContractsResponseBody defines body from GetContracts response

type GetDepositAddressesParams

type GetDepositAddressesParams struct {
	SubaccountId int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Chain        string `form:"chain" json:"chain"`
}

GetDepositAddressesParams defines parameters for GetDepositAddresses.

type GetDepositAddressesResponseBody

type GetDepositAddressesResponseBody = DepositAddressesResponse

GetDepositAddressesResponseBody defines body from GetDepositAddresses response

type GetDexTokenListResponseBody

type GetDexTokenListResponseBody = []DexToken

GetDexTokenListResponseBody defines body from GetDexTokenList response

type GetFundingRatePaymentsParams

type GetFundingRatePaymentsParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit        int `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetFundingRatePaymentsParams defines parameters for GetFundingRatePayments.

type GetFundingRatePaymentsResponseBody

type GetFundingRatePaymentsResponseBody = []FundingRatePayment

GetFundingRatePaymentsResponseBody defines body from GetFundingRatePayments response

type GetIndexPriceParams

type GetIndexPriceParams struct {
	Symbol string `form:"symbol" json:"symbol"`
}

GetIndexPriceParams defines parameters for GetIndexPrice.

type GetIndexPriceResponseBody

type GetIndexPriceResponseBody = IndexPrice

GetIndexPriceResponseBody defines body from GetIndexPrice response

type GetIndexPricesResponseBody

type GetIndexPricesResponseBody = []IndexPrice

GetIndexPricesResponseBody defines body from GetIndexPrices response

type GetL1BookParams

type GetL1BookParams struct {
	Symbol string `form:"symbol" json:"symbol"`
	Limit  int    `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetL1BookParams defines parameters for GetL1Book.

type GetL1BookResponseBody

type GetL1BookResponseBody = L1OrderBook

GetL1BookResponseBody defines body from GetL1Book response

type GetLiquidationPriceParams

type GetLiquidationPriceParams struct {
	SubaccountId int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Symbol       string `form:"symbol,omitempty" json:"symbol,omitempty,omitzero"`
}

GetLiquidationPriceParams defines parameters for GetLiquidationPrice.

type GetLiquidationPriceResponseBody

type GetLiquidationPriceResponseBody = LiquidationPrice

GetLiquidationPriceResponseBody defines body from GetLiquidationPrice response

type GetMarginParams

type GetMarginParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
}

GetMarginParams defines parameters for GetMargin.

type GetMarginResponseBody

type GetMarginResponseBody = Margin

GetMarginResponseBody defines body from GetMargin response

type GetMarginSchedulesResponseBody

type GetMarginSchedulesResponseBody = []MarginSchedule

GetMarginSchedulesResponseBody defines body from GetMarginSchedules response

type GetMarketCapChartResponseBody

type GetMarketCapChartResponseBody = MarketCapHistoricData

GetMarketCapChartResponseBody defines body from GetMarketCapChart response

type GetMarketCapsResponseBody

type GetMarketCapsResponseBody = MarketCapResponse

GetMarketCapsResponseBody defines body from GetMarketCaps response

type GetNotificationsParams

type GetNotificationsParams struct {
	Type   NotificationType `form:"type,omitempty" json:"type,omitempty,omitzero"`
	Limit  int              `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
	Offset int              `form:"offset,omitempty" json:"offset,omitempty,omitzero"`
}

GetNotificationsParams defines parameters for GetNotifications.

type GetNotificationsResponseBody

type GetNotificationsResponseBody = []Notification

GetNotificationsResponseBody defines body from GetNotifications response

type GetOpenOrderByClientOrderIdParams

type GetOpenOrderByClientOrderIdParams struct {
	SubaccountId  int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	ClientOrderId string `form:"clientOrderId,omitempty" json:"clientOrderId,omitempty,omitzero"`
}

GetOpenOrderByClientOrderIdParams defines parameters for GetOpenOrderByClientOrderId.

type GetOpenOrderByClientOrderIdResponseBody

type GetOpenOrderByClientOrderIdResponseBody = Order

GetOpenOrderByClientOrderIdResponseBody defines body from GetOpenOrderByClientOrderId response

type GetOrderByIdParams

type GetOrderByIdParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
}

GetOrderByIdParams defines parameters for GetOrderById.

type GetOrderByIdResponseBody

type GetOrderByIdResponseBody = Order

GetOrderByIdResponseBody defines body from GetOrderById response

type GetOrderHistoryParams

type GetOrderHistoryParams struct {
	Symbol       string `form:"symbol,omitempty" json:"symbol,omitempty,omitzero"`
	SubaccountId int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Limit        int    `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
	Offset       int    `form:"offset,omitempty" json:"offset,omitempty,omitzero"`
}

GetOrderHistoryParams defines parameters for GetOrderHistory.

type GetOrderHistoryResponseBody

type GetOrderHistoryResponseBody = []Order

GetOrderHistoryResponseBody defines body from GetOrderHistory response

type GetOrderHistoryWithTotalParams

type GetOrderHistoryWithTotalParams struct {
	Symbol       string `form:"symbol,omitempty" json:"symbol,omitempty,omitzero"`
	SubaccountId int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Limit        int    `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
	Offset       int    `form:"offset,omitempty" json:"offset,omitempty,omitzero"`
}

GetOrderHistoryWithTotalParams defines parameters for GetOrderHistoryWithTotal.

type GetOrderHistoryWithTotalResponseBody

type GetOrderHistoryWithTotalResponseBody = OrderHistoryWithTotalResponse

GetOrderHistoryWithTotalResponseBody defines body from GetOrderHistoryWithTotal response

type GetOrdersParams

type GetOrdersParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
}

GetOrdersParams defines parameters for GetOrders.

type GetOrdersResponseBody

type GetOrdersResponseBody = []Order

GetOrdersResponseBody defines body from GetOrders response

type GetPairParams

type GetPairParams struct {
	Symbol string `form:"symbol" json:"symbol"`
}

GetPairParams defines parameters for GetPair.

type GetPairResponseBody

type GetPairResponseBody = Pair

GetPairResponseBody defines body from GetPair response

type GetPairsResponseBody

type GetPairsResponseBody = []Pair

GetPairsResponseBody defines body from GetPairs response

type GetPortfolioBalanceHistoryParams

type GetPortfolioBalanceHistoryParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`

	// Start Time in microseconds since unix epoch
	Start int `form:"start,omitempty" json:"start,omitempty,omitzero"`

	// End Time in microseconds since unix epoch
	End int `form:"end,omitempty" json:"end,omitempty,omitzero"`
}

GetPortfolioBalanceHistoryParams defines parameters for GetPortfolioBalanceHistory.

type GetPortfolioBalanceHistoryResponseBody

type GetPortfolioBalanceHistoryResponseBody = []HistoricBalance

GetPortfolioBalanceHistoryResponseBody defines body from GetPortfolioBalanceHistory response

type GetPositionLeverageParams

type GetPositionLeverageParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
}

GetPositionLeverageParams defines parameters for GetPositionLeverage.

type GetPositionLeverageResponseBody

type GetPositionLeverageResponseBody = []PositionLeverage

GetPositionLeverageResponseBody defines body from GetPositionLeverage response

type GetPositionsParams

type GetPositionsParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
}

GetPositionsParams defines parameters for GetPositions.

type GetPositionsResponseBody

type GetPositionsResponseBody = []Position

GetPositionsResponseBody defines body from GetPositions response

type GetPriceAlertParams

type GetPriceAlertParams struct {
	SubaccountId int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Symbol       string `form:"symbol,omitempty" json:"symbol,omitempty,omitzero"`
}

GetPriceAlertParams defines parameters for GetPriceAlert.

type GetPriceAlertResponseBody

type GetPriceAlertResponseBody = PriceAlert

GetPriceAlertResponseBody defines body from GetPriceAlert response

type GetPublicTradesParams

type GetPublicTradesParams struct {
	Symbol string `form:"symbol" json:"symbol"`
	Before int    `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit  int    `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetPublicTradesParams defines parameters for GetPublicTrades.

type GetPublicTradesResponseBody

type GetPublicTradesResponseBody = PublicTradesResponse

GetPublicTradesResponseBody defines body from GetPublicTrades response

type GetReferralLinksResponseBody

type GetReferralLinksResponseBody = []ReferralLink

GetReferralLinksResponseBody defines body from GetReferralLinks response

type GetSubaccountsResponseBody

type GetSubaccountsResponseBody = []SubaccountWithSettings

GetSubaccountsResponseBody defines body from GetSubaccounts response

type GetTickerParams

type GetTickerParams struct {
	Symbol string `form:"symbol" json:"symbol"`
}

GetTickerParams defines parameters for GetTicker.

type GetTickerResponseBody

type GetTickerResponseBody = Ticker

GetTickerResponseBody defines body from GetTicker response

type GetTickersResponseBody

type GetTickersResponseBody = []Ticker

GetTickersResponseBody defines body from GetTickers response

type GetTriggerOrdersParams

type GetTriggerOrdersParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
}

GetTriggerOrdersParams defines parameters for GetTriggerOrders.

type GetTriggerOrdersResponseBody

type GetTriggerOrdersResponseBody = []TriggerOrder

GetTriggerOrdersResponseBody defines body from GetTriggerOrders response

type GetUserFeesResponseBody

type GetUserFeesResponseBody = UserFees

GetUserFeesResponseBody defines body from GetUserFees response

type GetUserResponseBody

type GetUserResponseBody = UserDisplay

GetUserResponseBody defines body from GetUser response

type GetUserSettingsResponseBody

type GetUserSettingsResponseBody = UserSettings

GetUserSettingsResponseBody defines body from GetUserSettings response

type GetUserTradesByTimeParams

type GetUserTradesByTimeParams struct {
	SubaccountId int `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`

	// From time from, inclusive
	From int `form:"from,omitempty" json:"from,omitempty,omitzero"`

	// To time to, inclusive
	To    int `form:"to,omitempty" json:"to,omitempty,omitzero"`
	Limit int `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetUserTradesByTimeParams defines parameters for GetUserTradesByTime.

type GetUserTradesByTimeResponseBody

type GetUserTradesByTimeResponseBody = []UserTrade

GetUserTradesByTimeResponseBody defines body from GetUserTradesByTime response

type GetUserTradesParams

type GetUserTradesParams struct {
	Symbol       string `form:"symbol,omitempty" json:"symbol,omitempty,omitzero"`
	SubaccountId int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Before       int    `form:"before,omitempty" json:"before,omitempty,omitzero"`
	Limit        int    `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
}

GetUserTradesParams defines parameters for GetUserTrades.

type GetUserTradesResponseBody

type GetUserTradesResponseBody = []UserTrade

GetUserTradesResponseBody defines body from GetUserTrades response

type GetUserTradesWithTotalsParams

type GetUserTradesWithTotalsParams struct {
	Symbol       string `form:"symbol,omitempty" json:"symbol,omitempty,omitzero"`
	SubaccountId int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Limit        int    `form:"limit,omitempty" json:"limit,omitempty,omitzero"`
	Offset       int    `form:"offset,omitempty" json:"offset,omitempty,omitzero"`
}

GetUserTradesWithTotalsParams defines parameters for GetUserTradesWithTotals.

type GetUserTradesWithTotalsResponseBody

type GetUserTradesWithTotalsResponseBody = UserTradesWithTotalsResponse

GetUserTradesWithTotalsResponseBody defines body from GetUserTradesWithTotals response

type GetWithdrawalAddressResponseBody

type GetWithdrawalAddressResponseBody = WithdrawalAddress

GetWithdrawalAddressResponseBody defines body from GetWithdrawalAddress response

type HandleDeleteSessionJSONRequestBody

type HandleDeleteSessionJSONRequestBody = DeleteSessionRequest

HandleDeleteSessionJSONRequestBody defines body for HandleDeleteSession for application/json ContentType.

type HandleReminderEmailUnsubscribeParams

type HandleReminderEmailUnsubscribeParams struct {
	LinkId string `form:"linkId" json:"linkId"`
}

HandleReminderEmailUnsubscribeParams defines parameters for HandleReminderEmailUnsubscribe.

type HandlerFunc

type HandlerFunc func(t WebsocketDataType, data []byte) error

Handler represents a callback function for handling WebSocket data

type HistoricBalance

type HistoricBalance struct {
	Amount string `json:"amount"`

	// Time Time in microseconds since unix epoch
	Time int `json:"time"`
}

HistoricBalance defines model for HistoricBalance.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IPInfo

type IPInfo struct {
	Location IPInfoLocation `json:"location"`
	Privacy  IPInfoPrivacy  `json:"privacy"`
}

IPInfo defines model for IPInfo.

type IPInfoLocation

type IPInfoLocation struct {
	City       string  `json:"city,omitzero"`
	Country    string  `json:"country,omitzero"`
	Latitude   float32 `json:"latitude,omitzero"`
	Longitude  float32 `json:"longitude,omitzero"`
	PostalCode string  `json:"postalCode,omitzero"`
	Region     string  `json:"region,omitzero"`
	Timezone   string  `json:"timezone,omitzero"`
}

IPInfoLocation defines model for IPInfoLocation.

type IPInfoPrivacy

type IPInfoPrivacy struct {
	Hosting bool   `json:"hosting"`
	Proxy   bool   `json:"proxy"`
	Relay   bool   `json:"relay"`
	Service string `json:"service,omitzero"`
	Tor     bool   `json:"tor"`
	Vpn     bool   `json:"vpn"`
}

IPInfoPrivacy defines model for IPInfoPrivacy.

type IndexPrice

type IndexPrice struct {
	Constituents []IndexPriceConstituent `json:"constituents"`
	Price        string                  `json:"price"`
	Symbol       string                  `json:"symbol"`

	// Time Time in microseconds since unix epoch
	Time int `json:"time"`
}

IndexPrice defines model for IndexPrice.

type IndexPriceConstituent

type IndexPriceConstituent struct {
	Exchange Exchange `json:"exchange"`
	Price    string   `json:"price"`

	// Time Time of the last update according to the exchange
	Time   int    `json:"time"`
	Weight string `json:"weight"`
}

IndexPriceConstituent defines model for IndexPriceConstituent.

type KeyPair

type KeyPair struct {
	ApiKey    string
	ApiSecret []byte
}

type L1OrderBook

type L1OrderBook struct {
	AskPrice   string `json:"askPrice,omitempty,omitzero"`
	AskSize    string `json:"askSize,omitempty,omitzero"`
	BidPrice   string `json:"bidPrice,omitempty,omitzero"`
	BidSize    string `json:"bidSize,omitempty,omitzero"`
	RevisionId int    `json:"revisionId"`
	Symbol     string `json:"symbol"`

	// Time Time in microseconds since unix epoch
	Time int `json:"time"`
}

L1OrderBook defines model for L1OrderBook.

type L1OrderBookSubscriptionParams

type L1OrderBookSubscriptionParams struct {
	Snapshot bool   `json:"snapshot,omitempty,omitzero"`
	Symbol   string `json:"symbol"`
}

L1OrderBookSubscriptionParams defines model for L1OrderBookSubscriptionParams.

type L2OrderBookSubscriptionParams

type L2OrderBookSubscriptionParams struct {
	// Group Price group for aggregation, must be a multiple of 1, 10, 100 or 1000 of the tick size. Default is the tick size.
	Group    string `json:"group,omitempty,omitzero"`
	Snapshot bool   `json:"snapshot,omitempty,omitzero"`
	Symbol   string `json:"symbol"`
}

L2OrderBookSubscriptionParams defines model for L2OrderBookSubscriptionParams.

type L2Update

type L2Update struct {
	Group      string    `json:"group"`
	Price      string    `json:"price"`
	RevisionId int       `json:"revisionId"`
	Side       OrderSide `json:"side"`
	Size       string    `json:"size"`
	Symbol     string    `json:"symbol"`

	// Time Time in microseconds since unix epoch
	Time int `json:"time"`
}

L2Update defines model for L2Update.

type LiquidationPrice

type LiquidationPrice struct {
	Price        string `json:"price,omitempty,omitzero"`
	SubaccountId int    `json:"subaccountId"`
	Symbol       string `json:"symbol"`
}

LiquidationPrice defines model for LiquidationPrice.

type ListWithdrawalAddressesResponseBody

type ListWithdrawalAddressesResponseBody = []WithdrawalAddress

ListWithdrawalAddressesResponseBody defines body from ListWithdrawalAddresses response

type ListingStatus

type ListingStatus string

ListingStatus defines model for ListingStatus.

const (
	ListingStatusDelisted ListingStatus = "delisted"
	ListingStatusListed   ListingStatus = "listed"
	ListingStatusStaged   ListingStatus = "staged"
)

Defines values for ListingStatus.

type Locale

type Locale string

Locale defines model for Locale.

const (
	LocaleEn Locale = "en"
	LocaleEs Locale = "es"
	LocaleUk Locale = "uk"
	LocaleVi Locale = "vi"
	LocaleZh Locale = "zh"
)

Defines values for Locale.

type LspAssignment

type LspAssignment struct {
	Base         string `json:"base"`
	Id           int    `json:"id"`
	PairSymbol   string `json:"pairSymbol"`
	Price        string `json:"price"`
	Quote        string `json:"quote"`
	SubaccountId int    `json:"subaccountId"`

	// Time Time in microseconds since unix epoch
	Time   int `json:"time"`
	UserId int `json:"userId"`
}

LspAssignment defines model for LspAssignment.

type LspAssignmentSubscriptionParams

type LspAssignmentSubscriptionParams struct {
	SubaccountId int `json:"subaccountId,omitempty,omitzero"`
}

LspAssignmentSubscriptionParams defines model for LspAssignmentSubscriptionParams.

type LspSetting

type LspSetting struct {
	MaxAssignmentNotional string `json:"maxAssignmentNotional"`
	MaxExposureNotional   string `json:"maxExposureNotional"`
	Symbol                string `json:"symbol"`
}

LspSetting defines model for LspSetting.

type Margin

type Margin struct {
	// Available Total margin available for opening new positions
	Available string `json:"available"`

	// Bonus Total margin bonus
	Bonus string `json:"bonus"`

	// Initial Initial margin required to open a position
	Initial string `json:"initial"`

	// Liquidation Amount of Margin required to prevent portfolio liquidations
	Liquidation string `json:"liquidation"`

	// Locked Total margin locked due to open positions and open orders
	Locked string `json:"locked"`

	// Maintenance Amount of Margin required to prevent partial liquidations
	Maintenance string `json:"maintenance"`

	// Pnl Total unrealized PnL
	Pnl          string `json:"pnl"`
	SubaccountId int    `json:"subaccountId"`

	// Total Total margin in the account, includes unrealized PnL
	Total string `json:"total"`

	// TotalAssetValue Total value of all assets in the account in USDT
	TotalAssetValue string `json:"totalAssetValue"`
}

Margin defines model for Margin.

type MarginSchedule

type MarginSchedule struct {
	Bands []MarginScheduleBand `json:"bands"`

	// Name Margin schedule name
	Name MarginScheduleName `json:"name"`
}

MarginSchedule defines model for MarginSchedule.

type MarginScheduleBand

type MarginScheduleBand struct {
	// LeverageRate leverage rate applied in this band
	LeverageRate string `json:"leverageRate"`

	// MarginRate Initial margin rate applied in this band
	MarginRate string `json:"marginRate"`

	// PositionLimit Maximum position size for this band
	PositionLimit string `json:"positionLimit"`

	// Rebate Initial margin rebate applied in this band
	Rebate string `json:"rebate"`
}

MarginScheduleBand defines model for MarginScheduleBand.

type MarginScheduleName

type MarginScheduleName string

MarginScheduleName Margin schedule name

const (
	MarginScheduleNameA MarginScheduleName = "A"
	MarginScheduleNameB MarginScheduleName = "B"
	MarginScheduleNameC MarginScheduleName = "C"
	MarginScheduleNameD MarginScheduleName = "D"
	MarginScheduleNameE MarginScheduleName = "E"
	MarginScheduleNameF MarginScheduleName = "F"
	MarginScheduleNameG MarginScheduleName = "G"
)

Defines values for MarginScheduleName.

type MarginSubscriptionParams

type MarginSubscriptionParams struct {
	Snapshot bool `json:"snapshot,omitempty,omitzero"`

	// SnapshotInterval Interval in seconds for getting snapshot data, set to regularly get refreshed snapshot values
	SnapshotInterval SnapshotInterval `json:"snapshotInterval,omitempty,omitzero"`
	SubaccountId     int              `json:"subaccountId,omitempty,omitzero"`
}

MarginSubscriptionParams defines model for MarginSubscriptionParams.

type MarkReadNotificationsJSONRequestBody

type MarkReadNotificationsJSONRequestBody = MarkReadNotificationsRequest

MarkReadNotificationsJSONRequestBody defines body for MarkReadNotifications for application/json ContentType.

type MarkReadNotificationsRequest

type MarkReadNotificationsRequest struct {
	// LastReadTime Time in microseconds since unix epoch
	LastReadTime int `json:"lastReadTime"`
}

MarkReadNotificationsRequest defines model for MarkReadNotificationsRequest.

type MarkReadNotificationsResponseBody

type MarkReadNotificationsResponseBody = string

MarkReadNotificationsResponseBody defines body from MarkReadNotifications response

type MarketCapHistoricData

type MarketCapHistoricData struct {
	MarketCapChart struct {
		MarketCap [][]float32 `json:"market_cap"`
		Volume    [][]float32 `json:"volume"`
	} `json:"market_cap_chart"`
}

MarketCapHistoricData defines model for MarketCapHistoricData.

type MarketCapResponse

type MarketCapResponse struct {
	MarketCapChangePercentage24hUsd float32 `json:"market_cap_change_percentage_24h_usd"`
	MarketCapPercentageBtc          float32 `json:"market_cap_percentage_btc"`
	TotalMarketCap                  float32 `json:"total_market_cap"`
}

MarketCapResponse defines model for MarketCapResponse.

type MinArkmLast30dResponseBody

type MinArkmLast30dResponseBody = string

MinArkmLast30dResponseBody defines body from MinArkmLast30d response

type NewDepositAddressJSONRequestBody

type NewDepositAddressJSONRequestBody = NewDepositAddressRequest

NewDepositAddressJSONRequestBody defines body for NewDepositAddress for application/json ContentType.

type NewDepositAddressRequest

type NewDepositAddressRequest struct {
	Chain        string `json:"chain"`
	SubaccountId int    `json:"subaccountId"`
}

NewDepositAddressRequest defines model for NewDepositAddressRequest.

type NewDepositAddressResponse

type NewDepositAddressResponse struct {
	Address string `json:"address"`
}

NewDepositAddressResponse defines model for NewDepositAddressResponse.

type NewDepositAddressResponseBody

type NewDepositAddressResponseBody = NewDepositAddressResponse

NewDepositAddressResponseBody defines body from NewDepositAddress response

type Notification

type Notification struct {
	Id           int    `json:"id"`
	IsRead       bool   `json:"isRead"`
	Message      string `json:"message"`
	OrderId      int    `json:"orderId,omitempty,omitzero"`
	SubaccountId int    `json:"subaccountId"`
	Symbol       string `json:"symbol,omitempty,omitzero"`

	// Time Time in microseconds since unix epoch
	Time  int              `json:"time"`
	Title string           `json:"title"`
	Type  NotificationType `json:"type"`
}

Notification defines model for Notification.

type NotificationType

type NotificationType string

NotificationType defines model for NotificationType.

const (
	NotificationTypeAdjustment   NotificationType = "adjustment"
	NotificationTypeAirdrop      NotificationType = "airdrop"
	NotificationTypeAnnouncement NotificationType = "announcement"
	NotificationTypeCommission   NotificationType = "commission"
	NotificationTypeDeleverage   NotificationType = "deleverage"
	NotificationTypeDeposit      NotificationType = "deposit"
	NotificationTypeExpiration   NotificationType = "expiration"
	NotificationTypeMargin       NotificationType = "margin"
	NotificationTypeOrder        NotificationType = "order"
	NotificationTypePrice        NotificationType = "price"
	NotificationTypeRebate       NotificationType = "rebate"
	NotificationTypeReward       NotificationType = "reward"
	NotificationTypeWithdrawal   NotificationType = "withdrawal"
)

Defines values for NotificationType.

type Order

type Order struct {
	// ArkmFeePaid Total ARKM fee paid so far in the order
	ArkmFeePaid string `json:"arkmFeePaid"`

	// AvgPrice Average price filled so far in the order
	AvgPrice      string `json:"avgPrice"`
	ClientOrderId string `json:"clientOrderId,omitempty,omitzero"`

	// CreditFeePaid Total fee paid via credits so far in the order
	CreditFeePaid string `json:"creditFeePaid"`

	// ExecutedNotional Total notional value filled so far in the order, 0 if no fills
	ExecutedNotional string `json:"executedNotional"`

	// ExecutedSize Total quantity filled so far in the order
	ExecutedSize string `json:"executedSize"`

	// LastArkmFee ARKM fee paid for the last trade, only present on taker and maker statuses
	LastArkmFee string `json:"lastArkmFee"`

	// LastCreditFee Credit fee paid for the last trade, only present on taker and maker statuses
	LastCreditFee string `json:"lastCreditFee"`

	// LastMarginBonusFee Margin bonus fee paid for the last trade, only present on taker and maker statuses
	LastMarginBonusFee string `json:"lastMarginBonusFee"`

	// LastPrice Price of the last trade, only present on taker and maker statuses
	LastPrice string `json:"lastPrice"`

	// LastQuoteFee Quote fee paid for the last trade, only present on taker and maker statuses
	LastQuoteFee string `json:"lastQuoteFee"`

	// LastSize Size of the last trade, only present on taker and maker statuses
	LastSize string `json:"lastSize"`

	// LastTime Time of the last status update on the order
	LastTime int `json:"lastTime"`

	// MarginBonusFeePaid Total fee paid via margin bonus so far in the order
	MarginBonusFeePaid string `json:"marginBonusFeePaid"`
	OrderId            int    `json:"orderId"`

	// PostOnly If true the order is post-only
	PostOnly bool `json:"postOnly"`

	// Price The original price of the order
	Price string `json:"price"`

	// QuoteFeePaid Total quote fee paid so far in the order
	QuoteFeePaid string `json:"quoteFeePaid"`

	// ReduceOnly If true the order is reduce-only
	ReduceOnly bool `json:"reduceOnly"`

	// RevisionId An identifier for the order's current state, unique to the pair
	RevisionId int       `json:"revisionId"`
	Side       OrderSide `json:"side"`

	// Size The original size of the order
	Size         string      `json:"size"`
	Status       OrderStatus `json:"status"`
	SubaccountId int         `json:"subaccountId"`
	Symbol       string      `json:"symbol"`

	// Time Time in microseconds since unix epoch
	Time int `json:"time"`

	// TriggerOrderId The ID of the trigger order that created this order, if any
	TriggerOrderId int       `json:"triggerOrderId,omitempty,omitzero"`
	Type           OrderType `json:"type"`
	UserId         int       `json:"userId"`
}

Order defines model for Order.

type OrderBatchItem

type OrderBatchItem struct {
	ClientOrderId string    `json:"clientOrderId,omitempty,omitzero"`
	Error         Error     `json:"error,omitempty,omitzero"`
	OrderId       int       `json:"orderId,omitempty,omitzero"`
	Price         string    `json:"price"`
	Side          OrderSide `json:"side"`
	Size          string    `json:"size"`
	SubaccountId  int       `json:"subaccountId"`
	Symbol        string    `json:"symbol"`
	Type          OrderType `json:"type"`
}

OrderBatchItem defines model for OrderBatchItem.

type OrderBook

type OrderBook struct {
	Asks  []OrderBookEntry `json:"asks"`
	Bids  []OrderBookEntry `json:"bids"`
	Group string           `json:"group"`

	// LastTime Time in microseconds since unix epoch
	LastTime int    `json:"lastTime"`
	Symbol   string `json:"symbol"`
}

OrderBook defines model for OrderBook.

type OrderBookEntry

type OrderBookEntry struct {
	Price string `json:"price"`
	Size  string `json:"size"`
}

OrderBookEntry defines model for OrderBookEntry.

type OrderHistoryWithTotalResponse

type OrderHistoryWithTotalResponse struct {
	Orders []Order `json:"orders"`
	Total  int     `json:"total"`
}

OrderHistoryWithTotalResponse defines model for OrderHistoryWithTotalResponse.

type OrderSide

type OrderSide string

OrderSide defines model for OrderSide.

const (
	OrderSideBuy  OrderSide = "buy"
	OrderSideSell OrderSide = "sell"
)

Defines values for OrderSide.

type OrderStatus

type OrderStatus string

OrderStatus defines model for OrderStatus.

const (
	OrderStatusBooked    OrderStatus = "booked"
	OrderStatusCancelled OrderStatus = "cancelled"
	OrderStatusClosed    OrderStatus = "closed"
	OrderStatusMaker     OrderStatus = "maker"
	OrderStatusNew       OrderStatus = "new"
	OrderStatusTaker     OrderStatus = "taker"
)

Defines values for OrderStatus.

type OrderStatusSubscriptionParams

type OrderStatusSubscriptionParams struct {
	Snapshot     bool `json:"snapshot,omitempty,omitzero"`
	SubaccountId int  `json:"subaccountId,omitempty,omitzero"`
}

OrderStatusSubscriptionParams defines model for OrderStatusSubscriptionParams.

type OrderType

type OrderType string

OrderType defines model for OrderType.

const (
	OrderTypeLimitFok OrderType = "limitFok"
	OrderTypeLimitGtc OrderType = "limitGtc"
	OrderTypeLimitIoc OrderType = "limitIoc"
	OrderTypeMarket   OrderType = "market"
)

Defines values for OrderType.

type Pair

type Pair struct {
	BaseImageUrl     string             `json:"baseImageUrl"`
	BaseIsStablecoin bool               `json:"baseIsStablecoin"`
	BaseName         string             `json:"baseName"`
	BaseSymbol       string             `json:"baseSymbol"`
	MarginSchedule   PairMarginSchedule `json:"marginSchedule,omitempty,omitzero"`
	MaxLeverage      string             `json:"maxLeverage,omitempty,omitzero"`
	MaxPrice         string             `json:"maxPrice"`

	// MaxPriceScalarDown Orders rejected if price is less than this scalar times the index price
	MaxPriceScalarDown string `json:"maxPriceScalarDown"`

	// MaxPriceScalarUp Orders rejected if price is greater than this scalar times the index price
	MaxPriceScalarUp string `json:"maxPriceScalarUp"`
	MaxSize          string `json:"maxSize"`
	MinLotSize       string `json:"minLotSize"`

	// MinNotional Minimum notional (price * size) for orders
	MinNotional       string        `json:"minNotional"`
	MinPrice          string        `json:"minPrice"`
	MinSize           string        `json:"minSize"`
	MinTickPrice      string        `json:"minTickPrice"`
	PairType          PairType      `json:"pairType"`
	QuoteImageUrl     string        `json:"quoteImageUrl"`
	QuoteIsStablecoin bool          `json:"quoteIsStablecoin"`
	QuoteName         string        `json:"quoteName"`
	QuoteSymbol       string        `json:"quoteSymbol"`
	Status            ListingStatus `json:"status"`
	Symbol            string        `json:"symbol"`
}

Pair defines model for Pair.

type PairMarginSchedule

type PairMarginSchedule string

PairMarginSchedule defines model for Pair.MarginSchedule.

const (
	PairMarginScheduleA PairMarginSchedule = "A"
	PairMarginScheduleB PairMarginSchedule = "B"
	PairMarginScheduleC PairMarginSchedule = "C"
	PairMarginScheduleD PairMarginSchedule = "D"
	PairMarginScheduleE PairMarginSchedule = "E"
	PairMarginScheduleF PairMarginSchedule = "F"
	PairMarginScheduleG PairMarginSchedule = "G"
)

Defines values for PairMarginSchedule.

type PairType

type PairType string

PairType defines model for PairType.

const (
	PairTypePerpetual PairType = "perpetual"
	PairTypeSpot      PairType = "spot"
)

Defines values for PairType.

type Position

type Position struct {
	AverageEntryPrice    string               `json:"averageEntryPrice"`
	Base                 string               `json:"base"`
	BreakEvenPrice       string               `json:"breakEvenPrice,omitempty,omitzero"`
	InitialMargin        string               `json:"initialMargin"`
	LastUpdateBaseDelta  string               `json:"lastUpdateBaseDelta"`
	LastUpdateId         int                  `json:"lastUpdateId"`
	LastUpdateQuoteDelta string               `json:"lastUpdateQuoteDelta"`
	LastUpdateReason     PositionUpdateReason `json:"lastUpdateReason"`

	// LastUpdateTime Time in microseconds since unix epoch
	LastUpdateTime    int    `json:"lastUpdateTime"`
	MaintenanceMargin string `json:"maintenanceMargin"`
	MarkPrice         string `json:"markPrice"`
	OpenBuyNotional   string `json:"openBuyNotional"`
	OpenBuySize       string `json:"openBuySize"`
	OpenSellNotional  string `json:"openSellNotional"`
	OpenSellSize      string `json:"openSellSize"`
	Pnl               string `json:"pnl"`
	Quote             string `json:"quote"`
	SubaccountId      int    `json:"subaccountId"`
	Symbol            string `json:"symbol"`
	Value             string `json:"value"`
}

Position defines model for Position.

type PositionLeverage

type PositionLeverage struct {
	Leverage string `json:"leverage"`
	Symbol   string `json:"symbol"`
}

PositionLeverage defines model for PositionLeverage.

type PositionSubscriptionParams

type PositionSubscriptionParams struct {
	Snapshot bool `json:"snapshot,omitempty,omitzero"`

	// SnapshotInterval Interval in seconds for getting snapshot data, set to regularly get refreshed snapshot values
	SnapshotInterval SnapshotInterval `json:"snapshotInterval,omitempty,omitzero"`
	SubaccountId     int              `json:"subaccountId,omitempty,omitzero"`
}

PositionSubscriptionParams defines model for PositionSubscriptionParams.

type PositionUpdate

type PositionUpdate struct {
	AvgEntryPrice string               `json:"avgEntryPrice"`
	Base          string               `json:"base"`
	BaseDelta     string               `json:"baseDelta"`
	Id            int                  `json:"id"`
	PairSymbol    string               `json:"pairSymbol"`
	Quote         string               `json:"quote"`
	QuoteDelta    string               `json:"quoteDelta"`
	Reason        PositionUpdateReason `json:"reason"`
	SubaccountId  int                  `json:"subaccountId"`

	// Time Time in microseconds since unix epoch
	Time int `json:"time"`
}

PositionUpdate defines model for PositionUpdate.

type PositionUpdateReason

type PositionUpdateReason string

PositionUpdateReason defines model for PositionUpdateReason.

const (
	PositionUpdateReasonAdjustment    PositionUpdateReason = "adjustment"
	PositionUpdateReasonAirdrop       PositionUpdateReason = "airdrop"
	PositionUpdateReasonAssetTransfer PositionUpdateReason = "assetTransfer"
	PositionUpdateReasonCommission    PositionUpdateReason = "commission"
	PositionUpdateReasonDeleverage    PositionUpdateReason = "deleverage"
	PositionUpdateReasonDeposit       PositionUpdateReason = "deposit"
	PositionUpdateReasonExpiration    PositionUpdateReason = "expiration"
	PositionUpdateReasonFundingFee    PositionUpdateReason = "fundingFee"
	PositionUpdateReasonLiquidation   PositionUpdateReason = "liquidation"
	PositionUpdateReasonLspAssignment PositionUpdateReason = "lspAssignment"
	PositionUpdateReasonOrderFill     PositionUpdateReason = "orderFill"
	PositionUpdateReasonPerpTransfer  PositionUpdateReason = "perpTransfer"
	PositionUpdateReasonRealizePNL    PositionUpdateReason = "realizePNL"
	PositionUpdateReasonRebate        PositionUpdateReason = "rebate"
	PositionUpdateReasonReward        PositionUpdateReason = "reward"
	PositionUpdateReasonTradingFee    PositionUpdateReason = "tradingFee"
	PositionUpdateReasonWithdraw      PositionUpdateReason = "withdraw"
	PositionUpdateReasonWithdrawalFee PositionUpdateReason = "withdrawalFee"
)

Defines values for PositionUpdateReason.

type PriceAlert

type PriceAlert struct {
	AlertPrice     string         `json:"alertPrice"`
	AlertPriceType AlertPriceType `json:"alertPriceType"`
	Symbol         string         `json:"symbol"`
}

PriceAlert defines model for PriceAlert.

type PublicTradesResponse

type PublicTradesResponse = []Trade

PublicTradesResponse defines model for PublicTradesResponse.

type RealizedPnl

type RealizedPnl struct {
	Amount       string `json:"amount"`
	AssetSymbol  string `json:"assetSymbol"`
	Id           int    `json:"id"`
	PairSymbol   string `json:"pairSymbol"`
	SubaccountId int    `json:"subaccountId"`

	// Time Time in microseconds since unix epoch
	Time   int `json:"time"`
	UserId int `json:"userId"`
}

RealizedPnl defines model for RealizedPnl.

type RealizedPnlResponseBody

type RealizedPnlResponseBody = []SizeTimeSeries

RealizedPnlResponseBody defines body from RealizedPnl response

type Rebate

type Rebate struct {
	Amount       string `json:"amount"`
	AssetSymbol  string `json:"assetSymbol"`
	Id           int    `json:"id"`
	SubaccountId int    `json:"subaccountId"`

	// Time Time in microseconds since unix epoch
	Time   int `json:"time"`
	UserId int `json:"userId"`
}

Rebate defines model for Rebate.

type RebateBalanceResponseBody

type RebateBalanceResponseBody = string

RebateBalanceResponseBody defines body from RebateBalance response

type ReferralCountResponseBody

type ReferralCountResponseBody = int

ReferralCountResponseBody defines body from ReferralCount response

type ReferralLink struct {
	// CreatedAt Time in microseconds since unix epoch
	CreatedAt int `json:"createdAt"`

	// DeletedAt Time in microseconds since unix epoch
	DeletedAt int    `json:"deletedAt,omitempty,omitzero"`
	Id        string `json:"id"`

	// LastUsedAt Time in microseconds since unix epoch
	LastUsedAt int    `json:"lastUsedAt,omitempty,omitzero"`
	Slug       string `json:"slug,omitzero"`
	Uses       int    `json:"uses"`
}

ReferralLink defines model for ReferralLink.

type ReferralLinkId

type ReferralLinkId = []int

ReferralLinkId defines model for ReferralLinkId.

type ReferralLinkResponse

type ReferralLinkResponse struct {
	LinkId ReferralLinkId `json:"linkId"`
}

ReferralLinkResponse defines model for ReferralLinkResponse.

type RemoveFromWatchlistJSONRequestBody

type RemoveFromWatchlistJSONRequestBody = RemoveFromWatchlistRequest

RemoveFromWatchlistJSONRequestBody defines body for RemoveFromWatchlist for application/json ContentType.

type RemoveFromWatchlistRequest

type RemoveFromWatchlistRequest struct {
	Symbol string `json:"symbol"`
}

RemoveFromWatchlistRequest defines model for RemoveFromWatchlistRequest.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RewardType

type RewardType string

RewardType defines model for RewardType.

const (
	RewardTypeFeeCredit          RewardType = "fee_credit"
	RewardTypeMarginBonus        RewardType = "margin_bonus"
	RewardTypePoints             RewardType = "points"
	RewardTypeTokens             RewardType = "tokens"
	RewardTypeTradingFeeDiscount RewardType = "trading_fee_discount"
)

Defines values for RewardType.

type RewardsInfo

type RewardsInfo struct {
	FeeCredit string `json:"feeCredit"`

	// FeeCreditExpires Time in microseconds since unix epoch
	FeeCreditExpires int    `json:"feeCreditExpires"`
	MarginBonus      string `json:"marginBonus"`

	// MarginBonusExpires Time in microseconds since unix epoch
	MarginBonusExpires int    `json:"marginBonusExpires"`
	Points             int    `json:"points"`
	TradingFeeDiscount string `json:"tradingFeeDiscount"`

	// TradingFeeDiscountExpires Time in microseconds since unix epoch
	TradingFeeDiscountExpires int `json:"tradingFeeDiscountExpires"`
}

RewardsInfo defines model for RewardsInfo.

type RewardsInfoResponseBody

type RewardsInfoResponseBody = RewardsInfo

RewardsInfoResponseBody defines body from RewardsInfo response

type RewardsVoucher

type RewardsVoucher struct {
	ActionDescription string                    `json:"actionDescription"`
	Bullets           []string                  `json:"bullets"`
	Conditions        []RewardsVoucherCondition `json:"conditions"`
	ConditionsJSON    string                    `json:"conditionsJSON"`

	// CreatedAt Time in microseconds since unix epoch
	CreatedAt        int           `json:"createdAt"`
	Id               int           `json:"id"`
	Name             string        `json:"name"`
	SequenceId       int           `json:"sequenceId,omitzero"`
	SequencePosition int           `json:"sequencePosition,omitzero"`
	Status           VoucherStatus `json:"status"`
	Type             RewardType    `json:"type"`
}

RewardsVoucher defines model for RewardsVoucher.

type RewardsVoucherCondition

type RewardsVoucherCondition struct {
	Action          string               `json:"action"`
	Completed       float32              `json:"completed"`
	ProgressSummary string               `json:"progressSummary"`
	ProgressText    string               `json:"progressText"`
	Type            VoucherConditionType `json:"type"`
}

RewardsVoucherCondition defines model for RewardsVoucherCondition.

type Secret

type Secret = string

Secret Base64 encoded 32 byte secret

type ServerTimeResponse

type ServerTimeResponse struct {
	// ServerTime Time in microseconds since unix epoch
	ServerTime int `json:"serverTime"`
}

ServerTimeResponse defines model for ServerTimeResponse.

type ServerTimeResponseBody

type ServerTimeResponseBody = ServerTimeResponse

ServerTimeResponseBody defines body from ServerTime response

type Session

type Session struct {
	CreatedAt     time.Time `json:"createdAt"`
	DeletedAt     time.Time `json:"deletedAt,omitzero"`
	ExpiresAt     time.Time `json:"expiresAt"`
	Id            int       `json:"id"`
	IpAddress     string    `json:"ipAddress"`
	IpApproved    bool      `json:"ipApproved"`
	IpInfo        IPInfo    `json:"ipInfo"`
	LastMfaAt     time.Time `json:"lastMfaAt,omitzero"`
	LastUsedAt    time.Time `json:"lastUsedAt"`
	MaxExpiration time.Time `json:"maxExpiration,omitzero"`
	UpdatedAt     time.Time `json:"updatedAt"`
	UserAgent     string    `json:"userAgent"`
	UserId        int       `json:"userId"`
}

Session defines model for Session.

type SessionsResponse

type SessionsResponse struct {
	CurrentSession int       `json:"currentSession"`
	Sessions       []Session `json:"sessions"`
}

SessionsResponse defines model for SessionsResponse.

type SetPositionLeverageJSONRequestBody

type SetPositionLeverageJSONRequestBody = SetPositionLeverageRequest

SetPositionLeverageJSONRequestBody defines body for SetPositionLeverage for application/json ContentType.

type SetPositionLeverageRequest

type SetPositionLeverageRequest struct {
	Leverage     string `json:"leverage"`
	SubaccountId int    `json:"subaccountId,omitempty,omitzero"`
	Symbol       string `json:"symbol"`
}

SetPositionLeverageRequest defines model for SetPositionLeverageRequest.

type SetPriceAlertJSONRequestBody

type SetPriceAlertJSONRequestBody = SetPriceAlertRequest

SetPriceAlertJSONRequestBody defines body for SetPriceAlert for application/json ContentType.

type SetPriceAlertParams

type SetPriceAlertParams struct {
	SubaccountId int    `form:"subaccountId,omitempty" json:"subaccountId,omitempty,omitzero"`
	Symbol       string `form:"symbol,omitempty" json:"symbol,omitempty,omitzero"`
}

SetPriceAlertParams defines parameters for SetPriceAlert.

type SetPriceAlertRequest

type SetPriceAlertRequest struct {
	AlertPrice     string         `json:"alertPrice"`
	AlertPriceType AlertPriceType `json:"alertPriceType"`
	AlertType      AlertType      `json:"alertType"`
}

SetPriceAlertRequest defines model for SetPriceAlertRequest.

type SizeTimeSeries

type SizeTimeSeries struct {
	Size string `json:"size"`

	// Time Time in microseconds since unix epoch
	Time int `json:"time"`
}

SizeTimeSeries defines model for SizeTimeSeries.

type SnapshotInterval

type SnapshotInterval = int

SnapshotInterval Interval in seconds for getting snapshot data, set to regularly get refreshed snapshot values

type SubaccountSettingsRequest

type SubaccountSettingsRequest struct {
	FuturesEnabled    bool         `json:"futuresEnabled"`
	IsLsp             bool         `json:"isLsp"`
	LspSettingUpdates []LspSetting `json:"lspSettingUpdates"`

	// PayFeesInArkm if true and ARKM balance is sufficient fees are paid in ARKM with a discount. This is only available for USDT pairs
	PayFeesInArkm bool `json:"payFeesInArkm"`
	SubaccountId  int  `json:"subaccountId"`
}

SubaccountSettingsRequest defines model for SubaccountSettingsRequest.

type SubaccountWithSettings

type SubaccountWithSettings struct {
	// CreatedAt Time in microseconds since unix epoch
	CreatedAt int `json:"createdAt"`

	// FuturesEnabled if true futures trading is enabled for the subaccount
	FuturesEnabled bool `json:"futuresEnabled"`
	Id             int  `json:"id"`

	// IsLsp if true the subaccount is a liquidity provider
	IsLsp       bool         `json:"isLsp"`
	LspSettings []LspSetting `json:"lspSettings"`
	Name        string       `json:"name"`

	// PayFeesInArkm if true and ARKM balance is sufficient fees are paid in ARKM with a discount. This is only available for USDT pairs
	PayFeesInArkm bool `json:"payFeesInArkm"`
	Pinned        bool `json:"pinned"`
}

SubaccountWithSettings defines model for SubaccountWithSettings.

type SubscriptionParams

type SubscriptionParams interface {
	// contains filtered or unexported methods
}

SubscriptionParams defines model for SubscriptionParams.

type Ticker

type Ticker struct {
	BaseSymbol      string `json:"baseSymbol"`
	FundingRate     string `json:"fundingRate"`
	High24h         string `json:"high24h"`
	IndexCurrency   string `json:"indexCurrency"`
	IndexPrice      string `json:"indexPrice"`
	Low24h          string `json:"low24h"`
	MarkPrice       string `json:"markPrice"`
	NextFundingRate string `json:"nextFundingRate"`

	// NextFundingTime Time in microseconds since unix epoch
	NextFundingTime int      `json:"nextFundingTime"`
	OpenInterest    string   `json:"openInterest"`
	OpenInterestUSD string   `json:"openInterestUSD"`
	Price           string   `json:"price"`
	Price24hAgo     string   `json:"price24hAgo"`
	ProductType     PairType `json:"productType"`
	QuoteSymbol     string   `json:"quoteSymbol"`
	QuoteVolume24h  string   `json:"quoteVolume24h"`
	Symbol          string   `json:"symbol"`
	UsdVolume24h    string   `json:"usdVolume24h"`
	Volume24h       string   `json:"volume24h"`
}

Ticker defines model for Ticker.

type TickerSubscriptionParams

type TickerSubscriptionParams struct {
	Snapshot bool   `json:"snapshot,omitempty,omitzero"`
	Symbol   string `json:"symbol"`
}

TickerSubscriptionParams defines model for TickerSubscriptionParams.

type Trade

type Trade struct {
	Price      string    `json:"price"`
	RevisionId int       `json:"revisionId"`
	Size       string    `json:"size"`
	Symbol     string    `json:"symbol"`
	TakerSide  OrderSide `json:"takerSide"`

	// Time Time in microseconds since unix epoch
	Time int `json:"time"`
}

Trade defines model for Trade.

type TradeSubscriptionParams

type TradeSubscriptionParams struct {
	Snapshot bool   `json:"snapshot,omitempty,omitzero"`
	Symbol   string `json:"symbol"`
}

TradeSubscriptionParams defines model for TradeSubscriptionParams.

type TradingVolume

type TradingVolume struct {
	PerpVolume string `json:"perpVolume"`
	SpotVolume string `json:"spotVolume"`
}

TradingVolume defines model for TradingVolume.

type TradingVolumeStats

type TradingVolumeStats struct {
	PerpMakerFees   string           `json:"perpMakerFees"`
	PerpMakerVolume string           `json:"perpMakerVolume"`
	PerpTakerFees   string           `json:"perpTakerFees"`
	PerpTakerVolume string           `json:"perpTakerVolume"`
	PerpVolume      []SizeTimeSeries `json:"perpVolume"`
	SpotMakerFees   string           `json:"spotMakerFees"`
	SpotMakerVolume string           `json:"spotMakerVolume"`
	SpotTakerFees   string           `json:"spotTakerFees"`
	SpotTakerVolume string           `json:"spotTakerVolume"`
	SpotVolume      []SizeTimeSeries `json:"spotVolume"`
	TotalVolume     []SizeTimeSeries `json:"totalVolume"`
}

TradingVolumeStats defines model for TradingVolumeStats.

type TradingVolumeStatsResponseBody

type TradingVolumeStatsResponseBody = TradingVolumeStats

TradingVolumeStatsResponseBody defines body from TradingVolumeStats response

type Transfer

type Transfer struct {
	// Amount Amount of asset transferred, negative if sent, positive if received.
	Amount       string `json:"amount"`
	Counterparty int    `json:"counterparty"`
	Id           int    `json:"id"`
	SubaccountId int    `json:"subaccountId"`
	Symbol       string `json:"symbol"`

	// Time Time in microseconds since unix epoch
	Time int `json:"time"`
}

Transfer defines model for Transfer.

type TriggerOrder

type TriggerOrder struct {
	ClientOrderId string        `json:"clientOrderId"`
	PostOnly      bool          `json:"postOnly"`
	Price         string        `json:"price"`
	ReduceOnly    bool          `json:"reduceOnly"`
	Side          OrderSide     `json:"side"`
	Size          string        `json:"size"`
	Status        TriggerStatus `json:"status"`
	SubaccountId  int           `json:"subaccountId"`
	Symbol        string        `json:"symbol"`

	// Time Time in microseconds since unix epoch
	Time             int              `json:"time"`
	TriggerOrderId   int              `json:"triggerOrderId"`
	TriggerPrice     string           `json:"triggerPrice"`
	TriggerPriceType TriggerPriceType `json:"triggerPriceType"`
	TriggerType      TriggerType      `json:"triggerType"`
	Type             OrderType        `json:"type"`
}

TriggerOrder defines model for TriggerOrder.

type TriggerOrderSubscriptionParams

type TriggerOrderSubscriptionParams struct {
	Snapshot     bool `json:"snapshot,omitempty,omitzero"`
	SubaccountId int  `json:"subaccountId,omitempty,omitzero"`
}

TriggerOrderSubscriptionParams defines model for TriggerOrderSubscriptionParams.

type TriggerPriceType

type TriggerPriceType string

TriggerPriceType defines model for TriggerPriceType.

const (
	TriggerPriceTypeIndex TriggerPriceType = "index"
	TriggerPriceTypeLast  TriggerPriceType = "last"
	TriggerPriceTypeMark  TriggerPriceType = "mark"
)

Defines values for TriggerPriceType.

type TriggerStatus

type TriggerStatus string

TriggerStatus defines model for TriggerStatus.

const (
	TriggerStatusCancelled TriggerStatus = "cancelled"
	TriggerStatusStaged    TriggerStatus = "staged"
	TriggerStatusTriggered TriggerStatus = "triggered"
)

Defines values for TriggerStatus.

type TriggerType

type TriggerType string

TriggerType defines model for TriggerType.

const (
	TriggerTypeStopLoss   TriggerType = "stopLoss"
	TriggerTypeTakeProfit TriggerType = "takeProfit"
)

Defines values for TriggerType.

type UUID

type UUID = uuid.UUID

UUID defines model for UUID.

type UnsubscribeFunc

type UnsubscribeFunc func() error

UnsubscribeFunc represents a function to unsubscribe from a channel

type UpdatePortfolioSettingsJSONRequestBody

type UpdatePortfolioSettingsJSONRequestBody = SubaccountSettingsRequest

UpdatePortfolioSettingsJSONRequestBody defines body for UpdatePortfolioSettings for application/json ContentType.

type UpdatePortfolioSettingsResponseBody

type UpdatePortfolioSettingsResponseBody = string

UpdatePortfolioSettingsResponseBody defines body from UpdatePortfolioSettings response

type UpdateReferralLinkSlugJSONRequestBody

type UpdateReferralLinkSlugJSONRequestBody = UpdateReferralLinkSlugRequest

UpdateReferralLinkSlugJSONRequestBody defines body for UpdateReferralLinkSlug for application/json ContentType.

type UpdateReferralLinkSlugRequest

type UpdateReferralLinkSlugRequest struct {
	Slug string `json:"slug"`
}

UpdateReferralLinkSlugRequest defines model for UpdateReferralLinkSlugRequest.

type UpdateSubaccountJSONRequestBody

type UpdateSubaccountJSONRequestBody = UpdateSubaccountRequest

UpdateSubaccountJSONRequestBody defines body for UpdateSubaccount for application/json ContentType.

type UpdateSubaccountRequest

type UpdateSubaccountRequest struct {
	Id     int    `json:"id"`
	Name   string `json:"name,omitzero"`
	Pinned bool   `json:"pinned,omitzero"`
}

UpdateSubaccountRequest defines model for UpdateSubaccountRequest.

type UpdateUserSettingsJSONRequestBody

type UpdateUserSettingsJSONRequestBody = UpdateUserSettingsRequest

UpdateUserSettingsJSONRequestBody defines body for UpdateUserSettings for application/json ContentType.

type UpdateUserSettingsRequest

type UpdateUserSettingsRequest struct {
	AllowSequenceEmails     bool    `json:"allowSequenceEmails,omitzero"`
	AutogenDepositAddresses bool    `json:"autogenDepositAddresses,omitzero"`
	ConfirmBeforePlaceOrder bool    `json:"confirmBeforePlaceOrder,omitzero"`
	HideBalances            bool    `json:"hideBalances,omitzero"`
	Language                Locale  `json:"language,omitempty,omitzero"`
	MarginUsageThreshold    float32 `json:"marginUsageThreshold,omitzero"`
	NotifyAnnouncements     bool    `json:"notifyAnnouncements,omitzero"`
	NotifyCommissions       bool    `json:"notifyCommissions,omitzero"`
	NotifyDeposits          bool    `json:"notifyDeposits,omitzero"`
	NotifyMarginUsage       bool    `json:"notifyMarginUsage,omitzero"`
	NotifyOrderFills        bool    `json:"notifyOrderFills,omitzero"`
	NotifyRebates           bool    `json:"notifyRebates,omitzero"`
	NotifySendEmail         bool    `json:"notifySendEmail,omitzero"`
	NotifyWithdrawals       bool    `json:"notifyWithdrawals,omitzero"`
	TickerTapeScroll        bool    `json:"tickerTapeScroll,omitzero"`
	UpdatesFlash            bool    `json:"updatesFlash,omitzero"`
}

UpdateUserSettingsRequest defines model for UpdateUserSettingsRequest.

type UpdateUserSettingsResponseBody

type UpdateUserSettingsResponseBody = string

UpdateUserSettingsResponseBody defines body from UpdateUserSettings response

type UpdateWithdrawalAddressLabelJSONRequestBody

type UpdateWithdrawalAddressLabelJSONRequestBody = UpdateWithdrawalAddressLabelRequest

UpdateWithdrawalAddressLabelJSONRequestBody defines body for UpdateWithdrawalAddressLabel for application/json ContentType.

type UpdateWithdrawalAddressLabelRequest

type UpdateWithdrawalAddressLabelRequest struct {
	Label string `json:"label"`
}

UpdateWithdrawalAddressLabelRequest defines model for UpdateWithdrawalAddressLabelRequest.

type UpdateWithdrawalAddressLabelResponseBody

type UpdateWithdrawalAddressLabelResponseBody = string

UpdateWithdrawalAddressLabelResponseBody defines body from UpdateWithdrawalAddressLabel response

type UserDisplay

type UserDisplay struct {
	// AirdropKycAt Time in microseconds since unix epoch
	AirdropKycAt int `json:"airdropKycAt"`

	// BecameVipAt Time in microseconds since unix epoch
	BecameVipAt int    `json:"becameVipAt"`
	Country     string `json:"country,omitzero"`

	// CreatedAt Time in microseconds since unix epoch
	CreatedAt int    `json:"createdAt"`
	Dmm       bool   `json:"dmm"`
	Email     string `json:"email"`

	// FeatureFlags List of feature flags enabled for the user
	FeatureFlags []string `json:"featureFlags"`
	Id           int      `json:"id"`

	// KycVerifiedAt Time in microseconds since unix epoch
	KycVerifiedAt int                      `json:"kycVerifiedAt"`
	Pmm           bool                     `json:"pmm"`
	RequireMFA    bool                     `json:"requireMFA"`
	Settings      UserSettings             `json:"settings"`
	Subaccounts   []SubaccountWithSettings `json:"subaccounts"`
	Username      string                   `json:"username"`
	WithdrawOnly  bool                     `json:"withdrawOnly"`
}

UserDisplay defines model for UserDisplay.

type UserFees

type UserFees struct {
	PerpMakerFee string `json:"perpMakerFee"`
	PerpTakerFee string `json:"perpTakerFee"`
	SpotMakerFee string `json:"spotMakerFee"`
	SpotTakerFee string `json:"spotTakerFee"`
}

UserFees defines model for UserFees.

type UserPoints

type UserPoints struct {
	Points int `json:"points"`
	Rank   int `json:"rank"`
}

UserPoints defines model for UserPoints.

type UserPointsResponseBody

type UserPointsResponseBody = UserPoints

UserPointsResponseBody defines body from UserPoints response

type UserPointsSeason1ResponseBody

type UserPointsSeason1ResponseBody = UserPoints

UserPointsSeason1ResponseBody defines body from UserPointsSeason1 response

type UserPointsSeason2ResponseBody

type UserPointsSeason2ResponseBody = UserPoints

UserPointsSeason2ResponseBody defines body from UserPointsSeason2 response

type UserReferralsSeason1ResponseBody

type UserReferralsSeason1ResponseBody = int

UserReferralsSeason1ResponseBody defines body from UserReferralsSeason1 response

type UserReferralsSeason2ResponseBody

type UserReferralsSeason2ResponseBody = int

UserReferralsSeason2ResponseBody defines body from UserReferralsSeason2 response

type UserSettings

type UserSettings struct {
	AllowSequenceEmails     bool    `json:"allowSequenceEmails"`
	AutogenDepositAddresses bool    `json:"autogenDepositAddresses"`
	ConfirmBeforePlaceOrder bool    `json:"confirmBeforePlaceOrder"`
	HideBalances            bool    `json:"hideBalances"`
	Language                Locale  `json:"language,omitempty,omitzero"`
	MarginUsageThreshold    float32 `json:"marginUsageThreshold"`
	NotifyAnnouncements     bool    `json:"notifyAnnouncements"`
	NotifyCommissions       bool    `json:"notifyCommissions"`
	NotifyDeposits          bool    `json:"notifyDeposits"`
	NotifyMarginUsage       bool    `json:"notifyMarginUsage"`
	NotifyOrderFills        bool    `json:"notifyOrderFills"`
	NotifyRebates           bool    `json:"notifyRebates"`
	NotifySendEmail         bool    `json:"notifySendEmail"`
	NotifyWithdrawals       bool    `json:"notifyWithdrawals"`
	TickerTapeScroll        bool    `json:"tickerTapeScroll"`
	UpdatesFlash            bool    `json:"updatesFlash"`
}

UserSettings defines model for UserSettings.

type UserTrade

type UserTrade struct {
	ArkmFee       string    `json:"arkmFee"`
	ClientOrderId string    `json:"clientOrderId"`
	OrderId       int       `json:"orderId"`
	Price         string    `json:"price"`
	QuoteFee      string    `json:"quoteFee"`
	RevisionId    int       `json:"revisionId"`
	Size          string    `json:"size"`
	Symbol        string    `json:"symbol"`
	TakerSide     OrderSide `json:"takerSide"`

	// Time Time in microseconds since unix epoch
	Time     int       `json:"time"`
	UserSide OrderSide `json:"userSide"`
}

UserTrade defines model for UserTrade.

type UserTradesWithTotalsResponse

type UserTradesWithTotalsResponse struct {
	Total  int         `json:"total"`
	Trades []UserTrade `json:"trades"`
}

UserTradesWithTotalsResponse defines model for UserTradesWithTotalsResponse.

type UserVolumeSeason1ResponseBody

type UserVolumeSeason1ResponseBody = TradingVolume

UserVolumeSeason1ResponseBody defines body from UserVolumeSeason1 response

type UserVolumeSeason2ResponseBody

type UserVolumeSeason2ResponseBody = TradingVolume

UserVolumeSeason2ResponseBody defines body from UserVolumeSeason2 response

type VoucherClaimRequest

type VoucherClaimRequest struct {
	VoucherId int `json:"voucherId"`
}

VoucherClaimRequest defines model for VoucherClaimRequest.

type VoucherConditionType

type VoucherConditionType string

VoucherConditionType defines model for VoucherConditionType.

const (
	VoucherConditionTypeBasicKyc       VoucherConditionType = "basic_kyc"
	VoucherConditionTypeDepositedToken VoucherConditionType = "deposited_token"
	VoucherConditionTypeDepositedUsd   VoucherConditionType = "deposited_usd"
	VoucherConditionTypeTradedToken    VoucherConditionType = "traded_token"
	VoucherConditionTypeTradedUsd      VoucherConditionType = "traded_usd"
)

Defines values for VoucherConditionType.

type VoucherStatus

type VoucherStatus string

VoucherStatus defines model for VoucherStatus.

const (
	VoucherStatusClaimable   VoucherStatus = "claimable"
	VoucherStatusClaimed     VoucherStatus = "claimed"
	VoucherStatusInProgress  VoucherStatus = "in_progress"
	VoucherStatusNotStarted  VoucherStatus = "not_started"
	VoucherStatusUnavailable VoucherStatus = "unavailable"
)

Defines values for VoucherStatus.

type VouchersParams

type VouchersParams struct {
	Claimed bool   `form:"claimed,omitempty" json:"claimed,omitempty,omitzero"`
	Locale  string `form:"locale,omitempty" json:"locale,omitempty,omitzero"`
}

VouchersParams defines parameters for Vouchers.

type VouchersResponseBody

type VouchersResponseBody = []RewardsVoucher

VouchersResponseBody defines body from Vouchers response

type WebsocketBalancesSnapshot

type WebsocketBalancesSnapshot struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           []Balance         `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketBalancesSnapshot defines model for WebsocketBalancesSnapshot.

type WebsocketBalancesSubscriptionArgs

type WebsocketBalancesSubscriptionArgs struct {
	Channel WebsocketChannel          `json:"channel"`
	Params  BalanceSubscriptionParams `json:"params"`
}

WebsocketBalancesSubscriptionArgs defines model for WebsocketBalancesSubscriptionArgs.

type WebsocketBalancesUpdate

type WebsocketBalancesUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           Balance           `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketBalancesUpdate defines model for WebsocketBalancesUpdate.

type WebsocketCandlesSubscriptionArgs

type WebsocketCandlesSubscriptionArgs struct {
	Channel WebsocketChannel         `json:"channel"`
	Params  CandleSubscriptionParams `json:"params"`
}

WebsocketCandlesSubscriptionArgs defines model for WebsocketCandlesSubscriptionArgs.

type WebsocketCandlesUpdate

type WebsocketCandlesUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           Candle            `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketCandlesUpdate defines model for WebsocketCandlesUpdate.

type WebsocketChannel

type WebsocketChannel string

WebsocketChannel defines model for WebsocketChannel.

const (
	WebsocketChannelBalances               WebsocketChannel = "balances"
	WebsocketChannelCandles                WebsocketChannel = "candles"
	WebsocketChannelConfirmations          WebsocketChannel = "confirmations"
	WebsocketChannelErrors                 WebsocketChannel = "errors"
	WebsocketChannelL1Updates              WebsocketChannel = "l1_updates"
	WebsocketChannelL2Updates              WebsocketChannel = "l2_updates"
	WebsocketChannelLspAssignments         WebsocketChannel = "lsp_assignments"
	WebsocketChannelMargin                 WebsocketChannel = "margin"
	WebsocketChannelOrderStatuses          WebsocketChannel = "order_statuses"
	WebsocketChannelOrdersCancel           WebsocketChannel = "orders/cancel"
	WebsocketChannelOrdersCancelAll        WebsocketChannel = "orders/cancel/all"
	WebsocketChannelOrdersNew              WebsocketChannel = "orders/new"
	WebsocketChannelPong                   WebsocketChannel = "pong"
	WebsocketChannelPositions              WebsocketChannel = "positions"
	WebsocketChannelTicker                 WebsocketChannel = "ticker"
	WebsocketChannelTrades                 WebsocketChannel = "trades"
	WebsocketChannelTriggerOrders          WebsocketChannel = "trigger_orders"
	WebsocketChannelTriggerOrdersCancel    WebsocketChannel = "trigger_orders/cancel"
	WebsocketChannelTriggerOrdersCancelAll WebsocketChannel = "trigger_orders/cancel/all"
	WebsocketChannelTriggerOrdersNew       WebsocketChannel = "trigger_orders/new"
)

Defines values for WebsocketChannel.

type WebsocketConfirmation

type WebsocketConfirmation struct {
	Channel        WebsocketChannel `json:"channel"`
	ConfirmationId string           `json:"confirmationId"`
}

WebsocketConfirmation defines model for WebsocketConfirmation.

type WebsocketDataType

type WebsocketDataType string

WebsocketDataType defines model for WebsocketDataType.

const (
	WebsocketDataTypeSnapshot WebsocketDataType = "snapshot"
	WebsocketDataTypeUpdate   WebsocketDataType = "update"
)

Defines values for WebsocketDataType.

type WebsocketErrorResponse

type WebsocketErrorResponse struct {
	Channel        WebsocketErrorResponseChannel `json:"channel"`
	Code           interface{}                   `json:"code"`
	ConfirmationId string                        `json:"confirmationId,omitempty,omitzero"`

	// Id The unique identifier for the error
	Id      ErrorId `json:"id"`
	Message string  `json:"message"`

	// Name The name of the error
	Name ErrorName `json:"name"`
}

WebsocketErrorResponse defines model for WebsocketErrorResponse.

type WebsocketErrorResponseChannel

type WebsocketErrorResponseChannel string

WebsocketErrorResponseChannel defines model for WebsocketErrorResponse.Channel.

const (
	WebsocketErrorResponseChannelErrors WebsocketErrorResponseChannel = "errors"
)

Defines values for WebsocketErrorResponseChannel.

type WebsocketExecuteRequest

type WebsocketExecuteRequest struct {
	Args           WebsocketExecuteRequestArgs `json:"args"`
	ConfirmationId string                      `json:"confirmationId,omitempty,omitzero"`
	Method         WebsocketMethod             `json:"method"`
}

WebsocketExecuteRequest defines model for WebsocketExecuteRequest.

type WebsocketExecuteRequestArgs

type WebsocketExecuteRequestArgs interface {
	// contains filtered or unexported methods
}

WebsocketExecuteRequestArgs defines model for WebsocketExecuteRequestArgs.

type WebsocketL1UpdatesSnapshot

type WebsocketL1UpdatesSnapshot struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           L1OrderBook       `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketL1UpdatesSnapshot defines model for WebsocketL1UpdatesSnapshot.

type WebsocketL1UpdatesSubscriptionArgs

type WebsocketL1UpdatesSubscriptionArgs struct {
	Channel WebsocketChannel              `json:"channel"`
	Params  L1OrderBookSubscriptionParams `json:"params"`
}

WebsocketL1UpdatesSubscriptionArgs defines model for WebsocketL1UpdatesSubscriptionArgs.

type WebsocketL1UpdatesUpdate

type WebsocketL1UpdatesUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           L1OrderBook       `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketL1UpdatesUpdate defines model for WebsocketL1UpdatesUpdate.

type WebsocketL2UpdatesSnapshot

type WebsocketL2UpdatesSnapshot struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           OrderBook         `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketL2UpdatesSnapshot defines model for WebsocketL2UpdatesSnapshot.

type WebsocketL2UpdatesSubscriptionArgs

type WebsocketL2UpdatesSubscriptionArgs struct {
	Channel WebsocketChannel              `json:"channel"`
	Params  L2OrderBookSubscriptionParams `json:"params"`
}

WebsocketL2UpdatesSubscriptionArgs defines model for WebsocketL2UpdatesSubscriptionArgs.

type WebsocketL2UpdatesUpdate

type WebsocketL2UpdatesUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           L2Update          `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketL2UpdatesUpdate defines model for WebsocketL2UpdatesUpdate.

type WebsocketLspAssignmentsSubscriptionArgs

type WebsocketLspAssignmentsSubscriptionArgs struct {
	Channel WebsocketChannel                `json:"channel"`
	Params  LspAssignmentSubscriptionParams `json:"params"`
}

WebsocketLspAssignmentsSubscriptionArgs defines model for WebsocketLspAssignmentsSubscriptionArgs.

type WebsocketLspAssignmentsUpdate

type WebsocketLspAssignmentsUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           LspAssignment     `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketLspAssignmentsUpdate defines model for WebsocketLspAssignmentsUpdate.

type WebsocketMarginSnapshot

type WebsocketMarginSnapshot struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           Margin            `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketMarginSnapshot defines model for WebsocketMarginSnapshot.

type WebsocketMarginSubscriptionArgs

type WebsocketMarginSubscriptionArgs struct {
	Channel WebsocketChannel         `json:"channel"`
	Params  MarginSubscriptionParams `json:"params"`
}

WebsocketMarginSubscriptionArgs defines model for WebsocketMarginSubscriptionArgs.

type WebsocketMarginUpdate

type WebsocketMarginUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           Margin            `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketMarginUpdate defines model for WebsocketMarginUpdate.

type WebsocketMethod

type WebsocketMethod string

WebsocketMethod defines model for WebsocketMethod.

const (
	WebsocketMethodExecute     WebsocketMethod = "execute"
	WebsocketMethodPing        WebsocketMethod = "ping"
	WebsocketMethodSubscribe   WebsocketMethod = "subscribe"
	WebsocketMethodUnsubscribe WebsocketMethod = "unsubscribe"
)

Defines values for WebsocketMethod.

type WebsocketOrderStatusesSnapshot

type WebsocketOrderStatusesSnapshot struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           []Order           `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketOrderStatusesSnapshot defines model for WebsocketOrderStatusesSnapshot.

type WebsocketOrderStatusesSubscriptionArgs

type WebsocketOrderStatusesSubscriptionArgs struct {
	Channel WebsocketChannel              `json:"channel"`
	Params  OrderStatusSubscriptionParams `json:"params"`
}

WebsocketOrderStatusesSubscriptionArgs defines model for WebsocketOrderStatusesSubscriptionArgs.

type WebsocketOrderStatusesUpdate

type WebsocketOrderStatusesUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           Order             `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketOrderStatusesUpdate defines model for WebsocketOrderStatusesUpdate.

type WebsocketOrdersCancelAllExecutionArgs

type WebsocketOrdersCancelAllExecutionArgs struct {
	Channel WebsocketChannel `json:"channel"`
	Params  CancelAllRequest `json:"params"`
}

WebsocketOrdersCancelAllExecutionArgs defines model for WebsocketOrdersCancelAllExecutionArgs.

type WebsocketOrdersCancelAllResponse

type WebsocketOrdersCancelAllResponse struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           CancelAllResponse `json:"data"`
}

WebsocketOrdersCancelAllResponse defines model for WebsocketOrdersCancelAllResponse.

type WebsocketOrdersCancelExecutionArgs

type WebsocketOrdersCancelExecutionArgs struct {
	Channel WebsocketChannel   `json:"channel"`
	Params  CancelOrderRequest `json:"params"`
}

WebsocketOrdersCancelExecutionArgs defines model for WebsocketOrdersCancelExecutionArgs.

type WebsocketOrdersCancelResponse

type WebsocketOrdersCancelResponse struct {
	Channel        WebsocketChannel    `json:"channel"`
	ConfirmationId string              `json:"confirmationId,omitempty,omitzero"`
	Data           CancelOrderResponse `json:"data"`
}

WebsocketOrdersCancelResponse defines model for WebsocketOrdersCancelResponse.

type WebsocketOrdersNewExecutionArgs

type WebsocketOrdersNewExecutionArgs struct {
	Channel WebsocketChannel   `json:"channel"`
	Params  CreateOrderRequest `json:"params"`
}

WebsocketOrdersNewExecutionArgs defines model for WebsocketOrdersNewExecutionArgs.

type WebsocketOrdersNewResponse

type WebsocketOrdersNewResponse struct {
	Channel        WebsocketChannel    `json:"channel"`
	ConfirmationId string              `json:"confirmationId,omitempty,omitzero"`
	Data           CreateOrderResponse `json:"data"`
}

WebsocketOrdersNewResponse defines model for WebsocketOrdersNewResponse.

type WebsocketPingRequest

type WebsocketPingRequest struct {
	ConfirmationId string          `json:"confirmationId,omitempty,omitzero"`
	Method         WebsocketMethod `json:"method"`
}

WebsocketPingRequest defines model for WebsocketPingRequest.

type WebsocketPongResponse

type WebsocketPongResponse struct {
	Channel WebsocketChannel `json:"channel"`
}

WebsocketPongResponse defines model for WebsocketPongResponse.

type WebsocketPositionsSnapshot

type WebsocketPositionsSnapshot struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           []Position        `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketPositionsSnapshot defines model for WebsocketPositionsSnapshot.

type WebsocketPositionsSubscriptionArgs

type WebsocketPositionsSubscriptionArgs struct {
	Channel WebsocketChannel           `json:"channel"`
	Params  PositionSubscriptionParams `json:"params"`
}

WebsocketPositionsSubscriptionArgs defines model for WebsocketPositionsSubscriptionArgs.

type WebsocketPositionsUpdate

type WebsocketPositionsUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           Position          `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketPositionsUpdate defines model for WebsocketPositionsUpdate.

type WebsocketRequest

type WebsocketRequest interface {
	// contains filtered or unexported methods
}

WebsocketRequest defines model for WebsocketRequest.

type WebsocketResponse

type WebsocketResponse interface {
	// contains filtered or unexported methods
}

WebsocketResponse defines model for WebsocketResponse.

type WebsocketSubscribeRequest

type WebsocketSubscribeRequest struct {
	Args           WebsocketSubscribeRequestArgs `json:"args"`
	ConfirmationId string                        `json:"confirmationId,omitempty,omitzero"`
	Method         WebsocketMethod               `json:"method"`
}

WebsocketSubscribeRequest defines model for WebsocketSubscribeRequest.

type WebsocketSubscribeRequestArgs

type WebsocketSubscribeRequestArgs interface {
	// contains filtered or unexported methods
}

WebsocketSubscribeRequestArgs defines model for WebsocketSubscribeRequestArgs.

type WebsocketTickerSnapshot

type WebsocketTickerSnapshot struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           Ticker            `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketTickerSnapshot defines model for WebsocketTickerSnapshot.

type WebsocketTickerSubscriptionArgs

type WebsocketTickerSubscriptionArgs struct {
	Channel WebsocketChannel         `json:"channel"`
	Params  TickerSubscriptionParams `json:"params"`
}

WebsocketTickerSubscriptionArgs defines model for WebsocketTickerSubscriptionArgs.

type WebsocketTickerUpdate

type WebsocketTickerUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           Ticker            `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketTickerUpdate defines model for WebsocketTickerUpdate.

type WebsocketTradesSnapshot

type WebsocketTradesSnapshot struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           []Trade           `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketTradesSnapshot defines model for WebsocketTradesSnapshot.

type WebsocketTradesSubscriptionArgs

type WebsocketTradesSubscriptionArgs struct {
	Channel WebsocketChannel        `json:"channel"`
	Params  TradeSubscriptionParams `json:"params"`
}

WebsocketTradesSubscriptionArgs defines model for WebsocketTradesSubscriptionArgs.

type WebsocketTradesUpdate

type WebsocketTradesUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           Trade             `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketTradesUpdate defines model for WebsocketTradesUpdate.

type WebsocketTriggerOrdersCancelAllExecutionArgs

type WebsocketTriggerOrdersCancelAllExecutionArgs struct {
	Channel WebsocketChannel              `json:"channel"`
	Params  CancelAllTriggerOrdersRequest `json:"params"`
}

WebsocketTriggerOrdersCancelAllExecutionArgs defines model for WebsocketTriggerOrdersCancelAllExecutionArgs.

type WebsocketTriggerOrdersCancelAllResponse

type WebsocketTriggerOrdersCancelAllResponse struct {
	Channel        WebsocketChannel               `json:"channel"`
	ConfirmationId string                         `json:"confirmationId,omitempty,omitzero"`
	Data           CancelAllTriggerOrdersResponse `json:"data"`
}

WebsocketTriggerOrdersCancelAllResponse defines model for WebsocketTriggerOrdersCancelAllResponse.

type WebsocketTriggerOrdersCancelExecutionArgs

type WebsocketTriggerOrdersCancelExecutionArgs struct {
	Channel WebsocketChannel          `json:"channel"`
	Params  CancelTriggerOrderRequest `json:"params"`
}

WebsocketTriggerOrdersCancelExecutionArgs defines model for WebsocketTriggerOrdersCancelExecutionArgs.

type WebsocketTriggerOrdersCancelResponse

type WebsocketTriggerOrdersCancelResponse struct {
	Channel        WebsocketChannel           `json:"channel"`
	ConfirmationId string                     `json:"confirmationId,omitempty,omitzero"`
	Data           CancelTriggerOrderResponse `json:"data"`
}

WebsocketTriggerOrdersCancelResponse defines model for WebsocketTriggerOrdersCancelResponse.

type WebsocketTriggerOrdersNewExecutionArgs

type WebsocketTriggerOrdersNewExecutionArgs struct {
	Channel WebsocketChannel          `json:"channel"`
	Params  CreateTriggerOrderRequest `json:"params"`
}

WebsocketTriggerOrdersNewExecutionArgs defines model for WebsocketTriggerOrdersNewExecutionArgs.

type WebsocketTriggerOrdersNewResponse

type WebsocketTriggerOrdersNewResponse struct {
	Channel        WebsocketChannel           `json:"channel"`
	ConfirmationId string                     `json:"confirmationId,omitempty,omitzero"`
	Data           CreateTriggerOrderResponse `json:"data"`
}

WebsocketTriggerOrdersNewResponse defines model for WebsocketTriggerOrdersNewResponse.

type WebsocketTriggerOrdersSnapshot

type WebsocketTriggerOrdersSnapshot struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           []TriggerOrder    `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketTriggerOrdersSnapshot defines model for WebsocketTriggerOrdersSnapshot.

type WebsocketTriggerOrdersSubscriptionArgs

type WebsocketTriggerOrdersSubscriptionArgs struct {
	Channel WebsocketChannel               `json:"channel"`
	Params  TriggerOrderSubscriptionParams `json:"params"`
}

WebsocketTriggerOrdersSubscriptionArgs defines model for WebsocketTriggerOrdersSubscriptionArgs.

type WebsocketTriggerOrdersUpdate

type WebsocketTriggerOrdersUpdate struct {
	Channel        WebsocketChannel  `json:"channel"`
	ConfirmationId string            `json:"confirmationId,omitempty,omitzero"`
	Data           TriggerOrder      `json:"data"`
	Type           WebsocketDataType `json:"type"`
}

WebsocketTriggerOrdersUpdate defines model for WebsocketTriggerOrdersUpdate.

type WebsocketUnsubscribeRequest

type WebsocketUnsubscribeRequest struct {
	Args           WebsocketSubscribeRequestArgs `json:"args"`
	ConfirmationId string                        `json:"confirmationId,omitempty,omitzero"`
	Method         WebsocketMethod               `json:"method"`
}

WebsocketUnsubscribeRequest defines model for WebsocketUnsubscribeRequest.

type Withdrawal

type Withdrawal struct {
	Amount       string `json:"amount"`
	Chain        string `json:"chain"`
	Confirmed    bool   `json:"confirmed"`
	Id           int    `json:"id"`
	Price        string `json:"price"`
	SubaccountId int    `json:"subaccountId"`
	Symbol       string `json:"symbol"`

	// Time Time in microseconds since unix epoch
	Time              int    `json:"time"`
	TransactionHash   string `json:"transactionHash,omitempty,omitzero"`
	WithdrawalAddress string `json:"withdrawalAddress"`
}

Withdrawal defines model for Withdrawal.

type WithdrawalAddress

type WithdrawalAddress struct {
	Address   string `json:"address"`
	Chain     string `json:"chain"`
	Confirmed bool   `json:"confirmed"`

	// CreatedAt Time in microseconds since unix epoch
	CreatedAt      int    `json:"createdAt"`
	HasBeneficiary bool   `json:"hasBeneficiary"`
	Id             int    `json:"id"`
	Label          string `json:"label"`

	// UpdatedAt Time in microseconds since unix epoch
	UpdatedAt int `json:"updatedAt"`
}

WithdrawalAddress defines model for WithdrawalAddress.

type WithdrawalTravelRuleBeneficiary

type WithdrawalTravelRuleBeneficiary struct {
	FirstName string `json:"firstName,omitzero"`
	IsSelf    bool   `json:"isSelf"`
	IsVasp    bool   `json:"isVasp,omitzero"`
	LastName  string `json:"lastName,omitzero"`
}

WithdrawalTravelRuleBeneficiary defines model for WithdrawalTravelRuleBeneficiary.

Directories

Path Synopsis
examples
rest command
Example usage of the Arkham Exchange REST API SDK
Example usage of the Arkham Exchange REST API SDK
websocket command
nolint
nolint

Jump to

Keyboard shortcuts

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