Documentation
¶
Index ¶
- Constants
- type APY
- type APYType
- type Account
- type AddressEVM
- type Asset
- type AssetID
- type AssetIDOrAddressEVMOrAssetSymbol
- type AssetSymbol
- type Balance
- type BalanceListHistoricalParams
- type BalanceListHistoricalResponse
- type BalanceListHistoricalResponseItem
- type BalanceListParams
- type BalanceListParamsAtUnion
- type BalanceListResponse
- type BalanceService
- type BlockNumber
- type Blockchain
- type BlockchainID
- type BlockchainIDOrBlockchainSymbol
- type BlockchainName
- type BlockchainSymbol
- type Blockstamp
- type BorrowAccount
- type BorrowAccountListHistoricalParams
- type BorrowAccountListHistoricalResponse
- type BorrowAccountListHistoricalResponseItem
- type BorrowAccountListParams
- type BorrowAccountListParamsAtUnion
- type BorrowAccountListResponse
- type BorrowAccountService
- func (r *BorrowAccountService) List(ctx context.Context, body BorrowAccountListParams, ...) (res *BorrowAccountListResponse, err error)
- func (r *BorrowAccountService) ListHistorical(ctx context.Context, body BorrowAccountListHistoricalParams, ...) (res *BorrowAccountListHistoricalResponse, err error)
- type BorrowMarket
- type BorrowMarketListHistoricalParams
- type BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest
- type BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest
- type BorrowMarketListHistoricalResponse
- type BorrowMarketListHistoricalResponseItem
- type BorrowMarketListParams
- type BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput
- type BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion
- type BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput
- type BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion
- type BorrowMarketListResponse
- type BorrowMarketService
- func (r *BorrowMarketService) List(ctx context.Context, body BorrowMarketListParams, opts ...option.RequestOption) (res *BorrowMarketListResponse, err error)
- func (r *BorrowMarketService) ListHistorical(ctx context.Context, body BorrowMarketListHistoricalParams, ...) (res *BorrowMarketListHistoricalResponse, err error)
- type BorrowPosition
- type BorrowPositionListHistoricalParams
- type BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest
- type BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest
- type BorrowPositionListHistoricalResponse
- type BorrowPositionListHistoricalResponseItem
- type BorrowPositionListParams
- type BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput
- type BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion
- type BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput
- type BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion
- type BorrowPositionListResponse
- type BorrowPositionService
- func (r *BorrowPositionService) List(ctx context.Context, body BorrowPositionListParams, ...) (res *BorrowPositionListResponse, err error)
- func (r *BorrowPositionService) ListHistorical(ctx context.Context, body BorrowPositionListHistoricalParams, ...) (res *BorrowPositionListHistoricalResponse, err error)
- type BorrowService
- type BridgeQuote
- type BridgeQuoteFeeEstimate
- type BridgeQuoteListParams
- type BridgeQuoteListResponse
- type BridgeQuoteService
- type BridgeService
- type BuyBuyNewParams
- type BuyBuyService
- type BuyQuote
- type BuyQuoteFeeEstimate
- type BuyQuoteListParams
- type BuyQuoteListResponse
- type BuyQuoteQuoteInfoUnion
- type BuyQuoteService
- type BuyService
- type ChainType
- type Decimal
- type EVMChainData
- type EVMChainDataParam
- type Error
- type Execution
- type ExecutionEVMTransactionEIP1559Payload
- type ExecutionEVMTransactionState
- type ExecutionID
- type ExecutionRequestBuyRequestFull
- type ExecutionRequestLendRequestFull
- type ExecutionRequestLendSetCollateralRequestFull
- type ExecutionRequestLendWithdrawRequestFull
- type ExecutionRequestLendWithdrawRequestFullAsset
- type ExecutionRequestMoveRequestFull
- type ExecutionRequestSellRequestFull
- type ExecutionRequestUnion
- func (u ExecutionRequestUnion) AsBuyRequestFull() (v ExecutionRequestBuyRequestFull)
- func (u ExecutionRequestUnion) AsLendRequestFull() (v ExecutionRequestLendRequestFull)
- func (u ExecutionRequestUnion) AsLendSetCollateralRequestFull() (v ExecutionRequestLendSetCollateralRequestFull)
- func (u ExecutionRequestUnion) AsLendWithdrawRequestFull() (v ExecutionRequestLendWithdrawRequestFull)
- func (u ExecutionRequestUnion) AsMoveRequestFull() (v ExecutionRequestMoveRequestFull)
- func (u ExecutionRequestUnion) AsSellRequestFull() (v ExecutionRequestSellRequestFull)
- func (u ExecutionRequestUnion) AsUnwrapRequestFull() (v ExecutionRequestUnwrapRequestFull)
- func (u ExecutionRequestUnion) AsWrapRequestFull() (v ExecutionRequestWrapRequestFull)
- func (u ExecutionRequestUnion) RawJSON() string
- func (r *ExecutionRequestUnion) UnmarshalJSON(data []byte) error
- type ExecutionRequestUnionAsset
- type ExecutionRequestUnwrapRequestFull
- type ExecutionRequestWrapRequestFull
- type ExecutionService
- type ExecutionState
- type ExecutionStep
- type ExecutionStepDefinitionExecutionEVMTransactionApprove
- type ExecutionStepDefinitionExecutionEVMTransactionApproveError
- type ExecutionStepDefinitionExecutionEVMTransactionBuy
- type ExecutionStepDefinitionExecutionEVMTransactionBuyError
- type ExecutionStepDefinitionExecutionEVMTransactionLend
- type ExecutionStepDefinitionExecutionEVMTransactionLendError
- type ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral
- type ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateralError
- type ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw
- type ExecutionStepDefinitionExecutionEVMTransactionLendWithdrawError
- type ExecutionStepDefinitionExecutionEVMTransactionMove
- type ExecutionStepDefinitionExecutionEVMTransactionMoveError
- type ExecutionStepDefinitionExecutionEVMTransactionPermission
- type ExecutionStepDefinitionExecutionEVMTransactionPermissionError
- type ExecutionStepDefinitionExecutionEVMTransactionSell
- type ExecutionStepDefinitionExecutionEVMTransactionSellError
- type ExecutionStepDefinitionExecutionEVMTransactionUnwrap
- type ExecutionStepDefinitionExecutionEVMTransactionUnwrapError
- type ExecutionStepDefinitionExecutionEVMTransactionWrap
- type ExecutionStepDefinitionExecutionEVMTransactionWrapError
- type ExecutionStepDefinitionUnion
- func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionApprove() (v ExecutionStepDefinitionExecutionEVMTransactionApprove)
- func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionBuy() (v ExecutionStepDefinitionExecutionEVMTransactionBuy)
- func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLend() (v ExecutionStepDefinitionExecutionEVMTransactionLend)
- func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLendSetCollateral() (v ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral)
- func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLendWithdraw() (v ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw)
- func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionMove() (v ExecutionStepDefinitionExecutionEVMTransactionMove)
- func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionPermission() (v ExecutionStepDefinitionExecutionEVMTransactionPermission)
- func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionSell() (v ExecutionStepDefinitionExecutionEVMTransactionSell)
- func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionUnwrap() (v ExecutionStepDefinitionExecutionEVMTransactionUnwrap)
- func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionWrap() (v ExecutionStepDefinitionExecutionEVMTransactionWrap)
- func (u ExecutionStepDefinitionUnion) RawJSON() string
- func (r *ExecutionStepDefinitionUnion) UnmarshalJSON(data []byte) error
- type ExecutionStepDefinitionUnionError
- type ExecutionStepDefinitionUnionQuote
- type ExecutionStepDefinitionUnionQuoteFeeEstimate
- type ExecutionStepDefinitionUnionQuoteQuoteInfo
- type ExecutionStepGetResponse
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionApproveError
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuyError
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendError
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateralError
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdrawError
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionMoveError
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermissionError
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionSellError
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrapError
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap
- type ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrapError
- type ExecutionStepGetResponseDefinitionUnion
- func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionApprove() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove)
- func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionBuy() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy)
- func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLend() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend)
- func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLendSetCollateral() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral)
- func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLendWithdraw() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw)
- func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionMove() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove)
- func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionPermission() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission)
- func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionSell() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell)
- func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionUnwrap() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap)
- func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionWrap() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap)
- func (u ExecutionStepGetResponseDefinitionUnion) RawJSON() string
- func (r *ExecutionStepGetResponseDefinitionUnion) UnmarshalJSON(data []byte) error
- type ExecutionStepGetResponseDefinitionUnionError
- type ExecutionStepGetResponseDefinitionUnionQuote
- type ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate
- type ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo
- type ExecutionStepGetResponseType
- type ExecutionStepID
- type ExecutionStepService
- type ExecutionStepSignParams
- type HexString
- type IncentivizeListParams
- type IncentivizeListResponse
- type IncentivizeMarket
- type IncentivizeService
- type LPDepositQuoteNewParams
- type LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput
- type LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange
- type LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput
- type LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier
- type LPDepositQuoteNewResponse
- type LPDepositQuoteService
- type LPPool
- type LPPoolAttributesUnion
- type LPPoolListHistoricalParams
- type LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest
- type LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest
- type LPPoolListHistoricalResponse
- type LPPoolListHistoricalResponseItem
- type LPPoolListParams
- type LPPoolListParamsBodyLPPoolsByIDsRequestInput
- type LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion
- type LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput
- type LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion
- type LPPoolListResponse
- type LPPoolPoolType
- type LPPoolService
- type LPPoolSolidlyAttributes
- type LPPoolUniswapV3Attributes
- type LPPosition
- type LPPositionAttributes
- type LPPositionLPAssetUnion
- type LPPositionLPAssetUnionID
- type LPPositionListHistoricalParams
- type LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest
- type LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest
- type LPPositionListHistoricalResponse
- type LPPositionListHistoricalResponseItem
- type LPPositionListParams
- type LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput
- type LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion
- type LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput
- type LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion
- type LPPositionListResponse
- type LPPositionService
- func (r *LPPositionService) List(ctx context.Context, body LPPositionListParams, opts ...option.RequestOption) (res *LPPositionListResponse, err error)
- func (r *LPPositionService) ListHistorical(ctx context.Context, body LPPositionListHistoricalParams, ...) (res *LPPositionListHistoricalResponse, err error)
- type LPQuote
- type LPService
- type LPWithdrawQuoteNewParams
- type LPWithdrawQuoteNewParamsSpecifier
- type LPWithdrawQuoteNewResponse
- type LPWithdrawQuoteService
- type LendBorrowAPYs
- type LendBorrowMarketID
- type LendLendNewParams
- type LendLendService
- type LendMarket
- type LendMarketListHistoricalParams
- type LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest
- type LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest
- type LendMarketListHistoricalResponse
- type LendMarketListHistoricalResponseItem
- type LendMarketListParams
- type LendMarketListParamsBodyLendMarketsByIDsRequestInput
- type LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion
- type LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput
- type LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion
- type LendMarketListResponse
- type LendMarketService
- func (r *LendMarketService) List(ctx context.Context, body LendMarketListParams, opts ...option.RequestOption) (res *LendMarketListResponse, err error)
- func (r *LendMarketService) ListHistorical(ctx context.Context, body LendMarketListHistoricalParams, ...) (res *LendMarketListHistoricalResponse, err error)
- type LendPosition
- type LendPositionListHistoricalParams
- type LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest
- type LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest
- type LendPositionListHistoricalResponse
- type LendPositionListHistoricalResponseItem
- type LendPositionListParams
- type LendPositionListParamsBodyLendPositionsByIDsRequestInput
- type LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion
- type LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput
- type LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion
- type LendPositionListResponse
- type LendPositionService
- func (r *LendPositionService) List(ctx context.Context, body LendPositionListParams, opts ...option.RequestOption) (res *LendPositionListResponse, err error)
- func (r *LendPositionService) ListHistorical(ctx context.Context, body LendPositionListHistoricalParams, ...) (res *LendPositionListHistoricalResponse, err error)
- type LendService
- type LendSetCollateralNewParams
- type LendSetCollateralService
- type LendWithdrawNewParams
- type LendWithdrawService
- type LockMarket
- type LockMarketListParams
- type LockMarketListResponse
- type LockMarketService
- type LockPosition
- type LockPositionListParams
- type LockPositionListResponse
- type LockPositionService
- type LockService
- type MoveNewParams
- type MoveService
- type NFT
- type NFTCollection
- type NFTCollectionBlockchain
- type NFTCollectionBlockchainParam
- type NFTCollectionParam
- type NFTParam
- type NetworkName
- type OffChainHistoricalRange
- type OnChainHistoricalRange
- type Price
- type PriceListHistoricalParams
- type PriceListHistoricalResponse
- type PriceListHistoricalResponseItem
- type PriceListParams
- type PriceListResponse
- type PriceService
- type QuoteInfo0x
- type QuoteInfo0xFill
- type QuoteInfo0xRoute
- type QuoteInfo0xToken
- type QuoteInfoCurve
- type QuoteInfoUniswapV2
- type QuoteInfoUniswapV3
- type RegionName
- type RegistryAssetListParams
- type RegistryAssetListResponse
- type RegistryAssetService
- type RegistryBlockchainListParams
- type RegistryBlockchainListResponse
- type RegistryBlockchainService
- type RegistryBorrowMarketListParams
- type RegistryBorrowMarketListResponse
- type RegistryBorrowMarketService
- type RegistryErrorListParams
- type RegistryErrorListResponse
- type RegistryErrorService
- type RegistryLPPool
- type RegistryLPPoolListParams
- type RegistryLPPoolListResponse
- type RegistryLPPoolService
- type RegistryLendBorrowMarket
- type RegistryLendMarketListParams
- type RegistryLendMarketListResponse
- type RegistryLendMarketService
- type RegistryService
- type RegistryVenueListParams
- type RegistryVenueListResponse
- type RegistryVenueService
- type ResourceStatus
- type SellQuote
- type SellQuoteFeeEstimate
- type SellQuoteListParams
- type SellQuoteListResponse
- type SellQuoteQuoteInfoUnion
- func (u SellQuoteQuoteInfoUnion) AsQuoteInfo0x() (v QuoteInfo0x)
- func (u SellQuoteQuoteInfoUnion) AsQuoteInfoCurve() (v QuoteInfoCurve)
- func (u SellQuoteQuoteInfoUnion) AsQuoteInfoUniswapV2() (v QuoteInfoUniswapV2)
- func (u SellQuoteQuoteInfoUnion) AsQuoteInfoUniswapV3() (v QuoteInfoUniswapV3)
- func (u SellQuoteQuoteInfoUnion) RawJSON() string
- func (r *SellQuoteQuoteInfoUnion) UnmarshalJSON(data []byte) error
- type SellQuoteService
- type SellSellNewParams
- type SellSellService
- type SellService
- type Timestamp
- type TimestampOrBlockNumberUnionParam
- type VektorError
- type VektorService
- type Venue
- type VenueID
- type VenueIDOrVenueSymbol
- type VenueSymbol
- type VoteMarket
- type VoteMarketListParams
- type VoteMarketListResponse
- type VoteMarketService
- type VoteReward
- type VoteRewardListParams
- type VoteRewardListResponse
- type VoteRewardService
- type VoteService
- type WrapService
- type WrapUnwrapNewParams
- type WrapUnwrapService
- type WrapWrapNewParams
- type WrapWrapService
Constants ¶
const RegionNameApSeo1 = shared.RegionNameApSeo1
Equals "ap-seo-1"
const RegionNameApSin1 = shared.RegionNameApSin1
Equals "ap-sin-1"
const RegionNameApTyo1 = shared.RegionNameApTyo1
Equals "ap-tyo-1"
const RegionNameEuAms1 = shared.RegionNameEuAms1
Equals "eu-ams-1"
const RegionNameEuFrk1 = shared.RegionNameEuFrk1
Equals "eu-frk-1"
const RegionNameEuLon1 = shared.RegionNameEuLon1
Equals "eu-lon-1"
const RegionNameUsChi1 = shared.RegionNameUsChi1
Equals "us-chi-1"
const RegionNameUsSea1 = shared.RegionNameUsSea1
Equals "us-sea-1"
const RegionNameUsSva1 = shared.RegionNameUsSva1
Equals "us-sva-1"
const RegionNameUsWdc1 = shared.RegionNameUsWdc1
Equals "us-wdc-1"
const ResourceStatusCreating = shared.ResourceStatusCreating
Equals "creating"
const ResourceStatusDeleted = shared.ResourceStatusDeleted
Equals "deleted"
const ResourceStatusDeleting = shared.ResourceStatusDeleting
Equals "deleting"
const ResourceStatusError = shared.ResourceStatusError
Equals "error"
const ResourceStatusPending = shared.ResourceStatusPending
Equals "pending"
const ResourceStatusReady = shared.ResourceStatusReady
Equals "ready"
const ResourceStatusUpdating = shared.ResourceStatusUpdating
Equals "updating"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APY ¶
type APY struct {
// An arbitrary precision decimal represented as a string
APY Decimal `json:"apy,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
// APY Type
//
// Any of "fixed", "variable".
Type APYType `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
APY respjson.Field
Asset respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
APY Data
func (*APY) UnmarshalJSON ¶
type AddressEVM ¶
type AddressEVM = string
type Asset ¶
type Asset struct {
// An asset ID, represented as a TypeID with `asset` prefix
ID AssetID `json:"id,required"`
// An EVM address
Address string `json:"address,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// Asset's decimal places
Decimals int64 `json:"decimals,required"`
// Asset's name
Name string `json:"name,required"`
// Asset's symbol
Symbol string `json:"symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
Blockchain respjson.Field
Decimals respjson.Field
Name respjson.Field
Symbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
On-chain asset (aka token)
func (*Asset) UnmarshalJSON ¶
type AssetIDOrAddressEVMOrAssetSymbol ¶
type AssetIDOrAddressEVMOrAssetSymbol = string
type AssetSymbol ¶
type AssetSymbol = string
type Balance ¶
type Balance struct {
// An EVM address
Account AddressEVM `json:"account,required"`
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// An asset ID, represented as a TypeID with `asset` prefix
AssetID AssetID `json:"asset_id,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// An arbitrary precision decimal represented as a string
Value Decimal `json:"value,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Amount respjson.Field
AssetID respjson.Field
Blockstamp respjson.Field
Value respjson.Field
QuoteAssetSymbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Balance properties
func (*Balance) UnmarshalJSON ¶
type BalanceListHistoricalParams ¶
type BalanceListHistoricalParams struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[AssetSymbol] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
func (BalanceListHistoricalParams) MarshalJSON ¶
func (r BalanceListHistoricalParams) MarshalJSON() (data []byte, err error)
func (*BalanceListHistoricalParams) UnmarshalJSON ¶
func (r *BalanceListHistoricalParams) UnmarshalJSON(data []byte) error
type BalanceListHistoricalResponse ¶
type BalanceListHistoricalResponse struct {
// A range of blockstamps
Historical OnChainHistoricalRange `json:"historical,required"`
Items []BalanceListHistoricalResponseItem `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Historical respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BalanceListHistoricalResponse) RawJSON ¶
func (r BalanceListHistoricalResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BalanceListHistoricalResponse) UnmarshalJSON ¶
func (r *BalanceListHistoricalResponse) UnmarshalJSON(data []byte) error
type BalanceListHistoricalResponseItem ¶
type BalanceListHistoricalResponseItem struct {
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// Array of Balance
Items []Balance `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockstamp respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BalanceListHistoricalResponseItem) RawJSON ¶
func (r BalanceListHistoricalResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*BalanceListHistoricalResponseItem) UnmarshalJSON ¶
func (r *BalanceListHistoricalResponseItem) UnmarshalJSON(data []byte) error
type BalanceListParams ¶
type BalanceListParams struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[AssetSymbol] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At BalanceListParamsAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
func (BalanceListParams) MarshalJSON ¶
func (r BalanceListParams) MarshalJSON() (data []byte, err error)
func (*BalanceListParams) UnmarshalJSON ¶
func (r *BalanceListParams) UnmarshalJSON(data []byte) error
type BalanceListParamsAtUnion ¶
type BalanceListParamsAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BalanceListParamsAtUnion) MarshalJSON ¶
func (u BalanceListParamsAtUnion) MarshalJSON() ([]byte, error)
func (*BalanceListParamsAtUnion) UnmarshalJSON ¶
func (u *BalanceListParamsAtUnion) UnmarshalJSON(data []byte) error
type BalanceListResponse ¶
type BalanceListResponse struct {
// Array of Balance
Items []Balance `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BalanceListResponse) RawJSON ¶
func (r BalanceListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BalanceListResponse) UnmarshalJSON ¶
func (r *BalanceListResponse) UnmarshalJSON(data []byte) error
type BalanceService ¶
type BalanceService struct {
Options []option.RequestOption
}
BalanceService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBalanceService method instead.
func NewBalanceService ¶
func NewBalanceService(opts ...option.RequestOption) (r BalanceService)
NewBalanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BalanceService) List ¶
func (r *BalanceService) List(ctx context.Context, body BalanceListParams, opts ...option.RequestOption) (res *BalanceListResponse, err error)
List balances for a given set of assets and addresses
func (*BalanceService) ListHistorical ¶
func (r *BalanceService) ListHistorical(ctx context.Context, body BalanceListHistoricalParams, opts ...option.RequestOption) (res *BalanceListHistoricalResponse, err error)
List balances for a given set of assets and addresses
type BlockNumber ¶
type BlockNumber = int64
type Blockchain ¶
type Blockchain struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
ID BlockchainID `json:"id,required"`
// Data about an EVM blockchain
ChainData EVMChainData `json:"chain_data,required"`
// Blockchain ecosystem
//
// Any of "evm".
ChainType ChainType `json:"chain_type,required"`
// The blockchain's explorer URL
ExplorerURL string `json:"explorer_url,required"`
// BlockchainName
Name BlockchainName `json:"name,required"`
// Blockchain's network
Network NetworkName `json:"network,required"`
// A blockchain symbol
Symbol BlockchainSymbol `json:"symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ChainData respjson.Field
ChainType respjson.Field
ExplorerURL respjson.Field
Name respjson.Field
Network respjson.Field
Symbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data about a blockchain
func (Blockchain) RawJSON ¶
func (r Blockchain) RawJSON() string
Returns the unmodified JSON received from the API
func (*Blockchain) UnmarshalJSON ¶
func (r *Blockchain) UnmarshalJSON(data []byte) error
type BlockchainID ¶
type BlockchainID = string
type BlockchainIDOrBlockchainSymbol ¶
type BlockchainIDOrBlockchainSymbol = string
type BlockchainName ¶
type BlockchainName = string
type BlockchainSymbol ¶
type BlockchainSymbol = string
type Blockstamp ¶
type Blockstamp struct {
// A block number
BlockNumber BlockNumber `json:"block_number,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// ISO8601 Timestamp
Timestamp Timestamp `json:"timestamp,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BlockNumber respjson.Field
Blockchain respjson.Field
Timestamp respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Information about a specific block number and its timestamp
func (Blockstamp) RawJSON ¶
func (r Blockstamp) RawJSON() string
Returns the unmodified JSON received from the API
func (*Blockstamp) UnmarshalJSON ¶
func (r *Blockstamp) UnmarshalJSON(data []byte) error
type BorrowAccount ¶
type BorrowAccount struct {
// An EVM address
Account Account `json:"account,required"`
// An arbitrary precision decimal represented as a string
AvailableBorrow Decimal `json:"available_borrow,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// An arbitrary precision decimal represented as a string
HealthFactor Decimal `json:"health_factor,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// An arbitrary precision decimal represented as a string
TotalCollateral Decimal `json:"total_collateral,required"`
// An arbitrary precision decimal represented as a string
TotalDebt Decimal `json:"total_debt,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
AvailableBorrow respjson.Field
Blockstamp respjson.Field
HealthFactor respjson.Field
QuoteAssetSymbol respjson.Field
TotalCollateral respjson.Field
TotalDebt respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A borrow account
func (BorrowAccount) RawJSON ¶
func (r BorrowAccount) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowAccount) UnmarshalJSON ¶
func (r *BorrowAccount) UnmarshalJSON(data []byte) error
type BorrowAccountListHistoricalParams ¶
type BorrowAccountListHistoricalParams struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
func (BorrowAccountListHistoricalParams) MarshalJSON ¶
func (r BorrowAccountListHistoricalParams) MarshalJSON() (data []byte, err error)
func (*BorrowAccountListHistoricalParams) UnmarshalJSON ¶
func (r *BorrowAccountListHistoricalParams) UnmarshalJSON(data []byte) error
type BorrowAccountListHistoricalResponse ¶
type BorrowAccountListHistoricalResponse struct {
// A range of blockstamps
Historical OnChainHistoricalRange `json:"historical,required"`
Items []BorrowAccountListHistoricalResponseItem `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Historical respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BorrowAccountListHistoricalResponse) RawJSON ¶
func (r BorrowAccountListHistoricalResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowAccountListHistoricalResponse) UnmarshalJSON ¶
func (r *BorrowAccountListHistoricalResponse) UnmarshalJSON(data []byte) error
type BorrowAccountListHistoricalResponseItem ¶
type BorrowAccountListHistoricalResponseItem struct {
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// A list of borrow accounts
Items []BorrowAccount `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockstamp respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BorrowAccountListHistoricalResponseItem) RawJSON ¶
func (r BorrowAccountListHistoricalResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowAccountListHistoricalResponseItem) UnmarshalJSON ¶
func (r *BorrowAccountListHistoricalResponseItem) UnmarshalJSON(data []byte) error
type BorrowAccountListParams ¶
type BorrowAccountListParams struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At BorrowAccountListParamsAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
func (BorrowAccountListParams) MarshalJSON ¶
func (r BorrowAccountListParams) MarshalJSON() (data []byte, err error)
func (*BorrowAccountListParams) UnmarshalJSON ¶
func (r *BorrowAccountListParams) UnmarshalJSON(data []byte) error
type BorrowAccountListParamsAtUnion ¶
type BorrowAccountListParamsAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BorrowAccountListParamsAtUnion) MarshalJSON ¶
func (u BorrowAccountListParamsAtUnion) MarshalJSON() ([]byte, error)
func (*BorrowAccountListParamsAtUnion) UnmarshalJSON ¶
func (u *BorrowAccountListParamsAtUnion) UnmarshalJSON(data []byte) error
type BorrowAccountListResponse ¶
type BorrowAccountListResponse struct {
// A list of borrow accounts
Items []BorrowAccount `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BorrowAccountListResponse) RawJSON ¶
func (r BorrowAccountListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowAccountListResponse) UnmarshalJSON ¶
func (r *BorrowAccountListResponse) UnmarshalJSON(data []byte) error
type BorrowAccountService ¶
type BorrowAccountService struct {
Options []option.RequestOption
}
BorrowAccountService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBorrowAccountService method instead.
func NewBorrowAccountService ¶
func NewBorrowAccountService(opts ...option.RequestOption) (r BorrowAccountService)
NewBorrowAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BorrowAccountService) List ¶
func (r *BorrowAccountService) List(ctx context.Context, body BorrowAccountListParams, opts ...option.RequestOption) (res *BorrowAccountListResponse, err error)
Get account-level borrow info on specified accounts
func (*BorrowAccountService) ListHistorical ¶
func (r *BorrowAccountService) ListHistorical(ctx context.Context, body BorrowAccountListHistoricalParams, opts ...option.RequestOption) (res *BorrowAccountListHistoricalResponse, err error)
Get account-level borrow info on specified accounts
type BorrowMarket ¶
type BorrowMarket struct {
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
ID LendBorrowMarketID `json:"id,required"`
// APY Data for lend/borrow markets
APYs LendBorrowAPYs `json:"apys,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// An arbitrary precision decimal represented as a string
Liquidity Decimal `json:"liquidity,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// An arbitrary precision decimal represented as a string
TotalDebt Decimal `json:"total_debt,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
APYs respjson.Field
Asset respjson.Field
Blockstamp respjson.Field
Liquidity respjson.Field
QuoteAssetSymbol respjson.Field
TotalDebt respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A borrow market
func (BorrowMarket) RawJSON ¶
func (r BorrowMarket) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowMarket) UnmarshalJSON ¶
func (r *BorrowMarket) UnmarshalJSON(data []byte) error
type BorrowMarketListHistoricalParams ¶
type BorrowMarketListHistoricalParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for querying borrow markets by venues and assets
OfHistoricalBorrowMarketsByVenuesAssetsRequest *BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for querying borrow markets by IDs
OfHistoricalBorrowMarketsByIDsRequest *BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest `json:",inline"`
// contains filtered or unexported fields
}
func (BorrowMarketListHistoricalParams) MarshalJSON ¶
func (u BorrowMarketListHistoricalParams) MarshalJSON() ([]byte, error)
func (*BorrowMarketListHistoricalParams) UnmarshalJSON ¶
func (r *BorrowMarketListHistoricalParams) UnmarshalJSON(data []byte) error
type BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest ¶
type BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// A list of lend/borrow market IDs
MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying borrow markets by IDs
The properties Blockchain, From, MarketIDs, To are required.
func (BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest) MarshalJSON ¶
func (r BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest) MarshalJSON() (data []byte, err error)
func (*BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest) UnmarshalJSON ¶
func (r *BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest) UnmarshalJSON(data []byte) error
type BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest ¶
type BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest struct {
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying borrow markets by venues and assets
The properties Assets, Blockchain, From, To, Venues are required.
func (BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest) MarshalJSON ¶
func (r BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest) MarshalJSON() (data []byte, err error)
func (*BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest) UnmarshalJSON ¶
func (r *BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest) UnmarshalJSON(data []byte) error
type BorrowMarketListHistoricalResponse ¶
type BorrowMarketListHistoricalResponse struct {
// A range of blockstamps
Historical OnChainHistoricalRange `json:"historical,required"`
Items []BorrowMarketListHistoricalResponseItem `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Historical respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BorrowMarketListHistoricalResponse) RawJSON ¶
func (r BorrowMarketListHistoricalResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowMarketListHistoricalResponse) UnmarshalJSON ¶
func (r *BorrowMarketListHistoricalResponse) UnmarshalJSON(data []byte) error
type BorrowMarketListHistoricalResponseItem ¶
type BorrowMarketListHistoricalResponseItem struct {
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// A list of borrow markets
Items []BorrowMarket `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockstamp respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BorrowMarketListHistoricalResponseItem) RawJSON ¶
func (r BorrowMarketListHistoricalResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowMarketListHistoricalResponseItem) UnmarshalJSON ¶
func (r *BorrowMarketListHistoricalResponseItem) UnmarshalJSON(data []byte) error
type BorrowMarketListParams ¶
type BorrowMarketListParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for querying borrow markets by venues and assets
OfBorrowMarketsByVenuesAssetsRequestInput *BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for querying borrow markets by IDs
OfBorrowMarketsByIDsRequestInput *BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput `json:",inline"`
// contains filtered or unexported fields
}
func (BorrowMarketListParams) MarshalJSON ¶
func (u BorrowMarketListParams) MarshalJSON() ([]byte, error)
func (*BorrowMarketListParams) UnmarshalJSON ¶
func (r *BorrowMarketListParams) UnmarshalJSON(data []byte) error
type BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput ¶
type BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of lend/borrow market IDs
MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying borrow markets by IDs
The properties Blockchain, MarketIDs are required.
func (BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput) MarshalJSON ¶
func (r BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput) MarshalJSON() (data []byte, err error)
func (*BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput) UnmarshalJSON ¶
func (r *BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput) UnmarshalJSON(data []byte) error
type BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion ¶
type BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion) MarshalJSON ¶
func (u BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion) UnmarshalJSON ¶
func (u *BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion) UnmarshalJSON(data []byte) error
type BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput ¶
type BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput struct {
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying borrow markets by venues and assets
The properties Assets, Blockchain, Venues are required.
func (BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput) MarshalJSON ¶
func (r BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput) MarshalJSON() (data []byte, err error)
func (*BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput) UnmarshalJSON ¶
func (r *BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput) UnmarshalJSON(data []byte) error
type BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion ¶
type BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion) MarshalJSON ¶
func (u BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON ¶
func (u *BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON(data []byte) error
type BorrowMarketListResponse ¶
type BorrowMarketListResponse struct {
// A list of borrow markets
Items []BorrowMarket `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BorrowMarketListResponse) RawJSON ¶
func (r BorrowMarketListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowMarketListResponse) UnmarshalJSON ¶
func (r *BorrowMarketListResponse) UnmarshalJSON(data []byte) error
type BorrowMarketService ¶
type BorrowMarketService struct {
Options []option.RequestOption
}
BorrowMarketService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBorrowMarketService method instead.
func NewBorrowMarketService ¶
func NewBorrowMarketService(opts ...option.RequestOption) (r BorrowMarketService)
NewBorrowMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BorrowMarketService) List ¶
func (r *BorrowMarketService) List(ctx context.Context, body BorrowMarketListParams, opts ...option.RequestOption) (res *BorrowMarketListResponse, err error)
Get the current market rates for borrowing an asset
func (*BorrowMarketService) ListHistorical ¶
func (r *BorrowMarketService) ListHistorical(ctx context.Context, body BorrowMarketListHistoricalParams, opts ...option.RequestOption) (res *BorrowMarketListHistoricalResponse, err error)
Get the current market rates for borrowing an asset
type BorrowPosition ¶
type BorrowPosition struct {
// An EVM address
Account Account `json:"account,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// An arbitrary precision decimal represented as a string
DebtAmount Decimal `json:"debt_amount,required"`
// A borrow market
Market BorrowMarket `json:"market,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Blockstamp respjson.Field
DebtAmount respjson.Field
Market respjson.Field
QuoteAssetSymbol respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A borrow position
func (BorrowPosition) RawJSON ¶
func (r BorrowPosition) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowPosition) UnmarshalJSON ¶
func (r *BorrowPosition) UnmarshalJSON(data []byte) error
type BorrowPositionListHistoricalParams ¶
type BorrowPositionListHistoricalParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for querying borrow positions by venues and assets
OfHistoricalBorrowPositionsByVenuesAssetsRequest *BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for querying borrow positions by IDs
OfHistoricalBorrowPositionsByIDsRequest *BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest `json:",inline"`
// contains filtered or unexported fields
}
func (BorrowPositionListHistoricalParams) MarshalJSON ¶
func (u BorrowPositionListHistoricalParams) MarshalJSON() ([]byte, error)
func (*BorrowPositionListHistoricalParams) UnmarshalJSON ¶
func (r *BorrowPositionListHistoricalParams) UnmarshalJSON(data []byte) error
type BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest ¶
type BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// A list of lend/borrow market IDs
MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying borrow positions by IDs
The properties Blockchain, From, MarketIDs, To are required.
func (BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest) MarshalJSON ¶
func (r BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest) MarshalJSON() (data []byte, err error)
func (*BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest) UnmarshalJSON ¶
func (r *BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest) UnmarshalJSON(data []byte) error
type BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest ¶
type BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying borrow positions by venues and assets
The properties Accounts, Assets, Blockchain, From, To, Venues are required.
func (BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest) MarshalJSON ¶
func (r BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest) MarshalJSON() (data []byte, err error)
func (*BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest) UnmarshalJSON ¶
func (r *BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest) UnmarshalJSON(data []byte) error
type BorrowPositionListHistoricalResponse ¶
type BorrowPositionListHistoricalResponse struct {
// A range of blockstamps
Historical OnChainHistoricalRange `json:"historical,required"`
Items []BorrowPositionListHistoricalResponseItem `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Historical respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BorrowPositionListHistoricalResponse) RawJSON ¶
func (r BorrowPositionListHistoricalResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowPositionListHistoricalResponse) UnmarshalJSON ¶
func (r *BorrowPositionListHistoricalResponse) UnmarshalJSON(data []byte) error
type BorrowPositionListHistoricalResponseItem ¶
type BorrowPositionListHistoricalResponseItem struct {
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// A list of borrow positions
Items []BorrowPosition `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockstamp respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BorrowPositionListHistoricalResponseItem) RawJSON ¶
func (r BorrowPositionListHistoricalResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowPositionListHistoricalResponseItem) UnmarshalJSON ¶
func (r *BorrowPositionListHistoricalResponseItem) UnmarshalJSON(data []byte) error
type BorrowPositionListParams ¶
type BorrowPositionListParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for querying borrow positions by venues and assets
OfBorrowPositionsByVenuesAssetsRequestInput *BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for querying borrow positions by IDs
OfBorrowPositionsByIDsRequestInput *BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput `json:",inline"`
// contains filtered or unexported fields
}
func (BorrowPositionListParams) MarshalJSON ¶
func (u BorrowPositionListParams) MarshalJSON() ([]byte, error)
func (*BorrowPositionListParams) UnmarshalJSON ¶
func (r *BorrowPositionListParams) UnmarshalJSON(data []byte) error
type BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput ¶
type BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of lend/borrow market IDs
MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero"`
// Either a ISO8601 timestamp or a block number
At BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying borrow positions by IDs
The properties Blockchain, MarketIDs are required.
func (BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput) MarshalJSON ¶
func (r BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput) MarshalJSON() (data []byte, err error)
func (*BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput) UnmarshalJSON ¶
func (r *BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput) UnmarshalJSON(data []byte) error
type BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion ¶
type BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion) MarshalJSON ¶
func (u BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion) UnmarshalJSON ¶
func (u *BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion) UnmarshalJSON(data []byte) error
type BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput ¶
type BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying borrow positions by venues and assets
The properties Accounts, Assets, Blockchain, Venues are required.
func (BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput) MarshalJSON ¶
func (r BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput) MarshalJSON() (data []byte, err error)
func (*BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput) UnmarshalJSON ¶
func (r *BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput) UnmarshalJSON(data []byte) error
type BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion ¶
type BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion) MarshalJSON ¶
func (u BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON ¶
func (u *BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON(data []byte) error
type BorrowPositionListResponse ¶
type BorrowPositionListResponse struct {
// A list of borrow positions
Items []BorrowPosition `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BorrowPositionListResponse) RawJSON ¶
func (r BorrowPositionListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BorrowPositionListResponse) UnmarshalJSON ¶
func (r *BorrowPositionListResponse) UnmarshalJSON(data []byte) error
type BorrowPositionService ¶
type BorrowPositionService struct {
Options []option.RequestOption
}
BorrowPositionService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBorrowPositionService method instead.
func NewBorrowPositionService ¶
func NewBorrowPositionService(opts ...option.RequestOption) (r BorrowPositionService)
NewBorrowPositionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BorrowPositionService) List ¶
func (r *BorrowPositionService) List(ctx context.Context, body BorrowPositionListParams, opts ...option.RequestOption) (res *BorrowPositionListResponse, err error)
Get info on borrowed positions
func (*BorrowPositionService) ListHistorical ¶
func (r *BorrowPositionService) ListHistorical(ctx context.Context, body BorrowPositionListHistoricalParams, opts ...option.RequestOption) (res *BorrowPositionListHistoricalResponse, err error)
Get info on borrowed positions
type BorrowService ¶
type BorrowService struct {
Options []option.RequestOption
Markets BorrowMarketService
Positions BorrowPositionService
Accounts BorrowAccountService
}
BorrowService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBorrowService method instead.
func NewBorrowService ¶
func NewBorrowService(opts ...option.RequestOption) (r BorrowService)
NewBorrowService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type BridgeQuote ¶
type BridgeQuote struct {
// Estimated cost of an operation
FeeEstimate BridgeQuoteFeeEstimate `json:"fee_estimate,required"`
// An arbitrary precision decimal represented as a string
ReceiveAmount Decimal `json:"receive_amount,required"`
// On-chain asset (aka token)
ReceiveAsset Asset `json:"receive_asset,required"`
// Estimated time to receive the asset (in seconds)
ReceiveTimeEst int64 `json:"receive_time_est,required"`
// The route name
Route string `json:"route,required"`
// An arbitrary precision decimal represented as a string
SendAmount Decimal `json:"send_amount,required"`
// On-chain asset (aka token)
SendAsset Asset `json:"send_asset,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FeeEstimate respjson.Field
ReceiveAmount respjson.Field
ReceiveAsset respjson.Field
ReceiveTimeEst respjson.Field
Route respjson.Field
SendAmount respjson.Field
SendAsset respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A bridge quote
func (BridgeQuote) RawJSON ¶
func (r BridgeQuote) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeQuote) UnmarshalJSON ¶
func (r *BridgeQuote) UnmarshalJSON(data []byte) error
type BridgeQuoteFeeEstimate ¶
type BridgeQuoteFeeEstimate struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
// An arbitrary precision decimal represented as a string
Cost string `json:"cost,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
Cost respjson.Field
QuoteAssetSymbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Estimated cost of an operation
func (BridgeQuoteFeeEstimate) RawJSON ¶
func (r BridgeQuoteFeeEstimate) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeQuoteFeeEstimate) UnmarshalJSON ¶
func (r *BridgeQuoteFeeEstimate) UnmarshalJSON(data []byte) error
type BridgeQuoteListParams ¶
type BridgeQuoteListParams struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// An asset symbol
Asset AssetSymbol `json:"asset,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
FromBlockchain BlockchainIDOrBlockchainSymbol `json:"from_blockchain,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
ToBlockchain BlockchainIDOrBlockchainSymbol `json:"to_blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
func (BridgeQuoteListParams) MarshalJSON ¶
func (r BridgeQuoteListParams) MarshalJSON() (data []byte, err error)
func (*BridgeQuoteListParams) UnmarshalJSON ¶
func (r *BridgeQuoteListParams) UnmarshalJSON(data []byte) error
type BridgeQuoteListResponse ¶
type BridgeQuoteListResponse struct {
// A list of bridge quotes
Items []BridgeQuote `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BridgeQuoteListResponse) RawJSON ¶
func (r BridgeQuoteListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeQuoteListResponse) UnmarshalJSON ¶
func (r *BridgeQuoteListResponse) UnmarshalJSON(data []byte) error
type BridgeQuoteService ¶
type BridgeQuoteService struct {
Options []option.RequestOption
}
BridgeQuoteService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBridgeQuoteService method instead.
func NewBridgeQuoteService ¶
func NewBridgeQuoteService(opts ...option.RequestOption) (r BridgeQuoteService)
NewBridgeQuoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BridgeQuoteService) List ¶
func (r *BridgeQuoteService) List(ctx context.Context, body BridgeQuoteListParams, opts ...option.RequestOption) (res *BridgeQuoteListResponse, err error)
Get quotes for bridging an exact amount of an asset to another blockchain
type BridgeService ¶
type BridgeService struct {
Options []option.RequestOption
Quotes BridgeQuoteService
}
BridgeService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBridgeService method instead.
func NewBridgeService ¶
func NewBridgeService(opts ...option.RequestOption) (r BridgeService)
NewBridgeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type BuyBuyNewParams ¶
type BuyBuyNewParams struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// An arbitrary precision decimal represented as a string
ReceiveAmount Decimal `json:"receive_amount,required"`
// An asset ID, represented as a TypeID with `asset` prefix
ReceiveAsset AssetIDOrAddressEVMOrAssetSymbol `json:"receive_asset,required"`
// An asset ID, represented as a TypeID with `asset` prefix
SpendAsset AssetIDOrAddressEVMOrAssetSymbol `json:"spend_asset,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An arbitrary precision decimal represented as a string
Slippage param.Opt[string] `json:"slippage,omitzero"`
// contains filtered or unexported fields
}
func (BuyBuyNewParams) MarshalJSON ¶
func (r BuyBuyNewParams) MarshalJSON() (data []byte, err error)
func (*BuyBuyNewParams) UnmarshalJSON ¶
func (r *BuyBuyNewParams) UnmarshalJSON(data []byte) error
type BuyBuyService ¶
type BuyBuyService struct {
Options []option.RequestOption
}
BuyBuyService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBuyBuyService method instead.
func NewBuyBuyService ¶
func NewBuyBuyService(opts ...option.RequestOption) (r BuyBuyService)
NewBuyBuyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BuyBuyService) New ¶
func (r *BuyBuyService) New(ctx context.Context, body BuyBuyNewParams, opts ...option.RequestOption) (res *Execution, err error)
Buy an asset with another asset
type BuyQuote ¶
type BuyQuote struct {
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// Estimated cost of an operation
FeeEstimate BuyQuoteFeeEstimate `json:"fee_estimate,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// Quote info for buy quotes
QuoteInfo BuyQuoteQuoteInfoUnion `json:"quote_info,required"`
// An arbitrary precision decimal represented as a string
QuoteValue string `json:"quote_value,required"`
// An arbitrary precision decimal represented as a string
ReceiveAmount Decimal `json:"receive_amount,required"`
// On-chain asset (aka token)
ReceiveAsset Asset `json:"receive_asset,required"`
// An arbitrary precision decimal represented as a string
SpendAmount Decimal `json:"spend_amount,required"`
// On-chain asset (aka token)
SpendAsset Asset `json:"spend_asset,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockchain respjson.Field
FeeEstimate respjson.Field
QuoteAssetSymbol respjson.Field
QuoteInfo respjson.Field
QuoteValue respjson.Field
ReceiveAmount respjson.Field
ReceiveAsset respjson.Field
SpendAmount respjson.Field
SpendAsset respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A buy quote
func (*BuyQuote) UnmarshalJSON ¶
type BuyQuoteFeeEstimate ¶
type BuyQuoteFeeEstimate struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
// An arbitrary precision decimal represented as a string
Cost string `json:"cost,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
Cost respjson.Field
QuoteAssetSymbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Estimated cost of an operation
func (BuyQuoteFeeEstimate) RawJSON ¶
func (r BuyQuoteFeeEstimate) RawJSON() string
Returns the unmodified JSON received from the API
func (*BuyQuoteFeeEstimate) UnmarshalJSON ¶
func (r *BuyQuoteFeeEstimate) UnmarshalJSON(data []byte) error
type BuyQuoteListParams ¶
type BuyQuoteListParams struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An arbitrary precision decimal represented as a string
ReceiveAmount Decimal `json:"receive_amount,required"`
// An asset ID, represented as a TypeID with `asset` prefix
ReceiveAsset AssetIDOrAddressEVMOrAssetSymbol `json:"receive_asset,required"`
// An asset ID, represented as a TypeID with `asset` prefix
SpendAsset AssetIDOrAddressEVMOrAssetSymbol `json:"spend_asset,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
func (BuyQuoteListParams) MarshalJSON ¶
func (r BuyQuoteListParams) MarshalJSON() (data []byte, err error)
func (*BuyQuoteListParams) UnmarshalJSON ¶
func (r *BuyQuoteListParams) UnmarshalJSON(data []byte) error
type BuyQuoteListResponse ¶
type BuyQuoteListResponse struct {
// A list of buy quotes
Items []BuyQuote `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BuyQuoteListResponse) RawJSON ¶
func (r BuyQuoteListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BuyQuoteListResponse) UnmarshalJSON ¶
func (r *BuyQuoteListResponse) UnmarshalJSON(data []byte) error
type BuyQuoteQuoteInfoUnion ¶
type BuyQuoteQuoteInfoUnion struct {
PoolIDs []string `json:"pool_ids"`
JSON struct {
PoolIDs respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BuyQuoteQuoteInfoUnion contains all possible properties and values from QuoteInfoUniswapV2, QuoteInfoUniswapV3.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (BuyQuoteQuoteInfoUnion) AsQuoteInfoUniswapV2 ¶
func (u BuyQuoteQuoteInfoUnion) AsQuoteInfoUniswapV2() (v QuoteInfoUniswapV2)
func (BuyQuoteQuoteInfoUnion) AsQuoteInfoUniswapV3 ¶
func (u BuyQuoteQuoteInfoUnion) AsQuoteInfoUniswapV3() (v QuoteInfoUniswapV3)
func (BuyQuoteQuoteInfoUnion) RawJSON ¶
func (u BuyQuoteQuoteInfoUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BuyQuoteQuoteInfoUnion) UnmarshalJSON ¶
func (r *BuyQuoteQuoteInfoUnion) UnmarshalJSON(data []byte) error
type BuyQuoteService ¶
type BuyQuoteService struct {
Options []option.RequestOption
}
BuyQuoteService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBuyQuoteService method instead.
func NewBuyQuoteService ¶
func NewBuyQuoteService(opts ...option.RequestOption) (r BuyQuoteService)
NewBuyQuoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BuyQuoteService) List ¶
func (r *BuyQuoteService) List(ctx context.Context, body BuyQuoteListParams, opts ...option.RequestOption) (res *BuyQuoteListResponse, err error)
Get quotes for buying an exact amount of an asset at current market rate
type BuyService ¶
type BuyService struct {
Options []option.RequestOption
Quotes BuyQuoteService
Buy BuyBuyService
}
BuyService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBuyService method instead.
func NewBuyService ¶
func NewBuyService(opts ...option.RequestOption) (r BuyService)
NewBuyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ChainType ¶
type ChainType string
Blockchain ecosystem
const (
ChainTypeEVM ChainType = "evm"
)
type EVMChainData ¶
type EVMChainData struct {
// Chain ID
ChainID int64 `json:"chain_id,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChainID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data about an EVM blockchain
func (EVMChainData) RawJSON ¶
func (r EVMChainData) RawJSON() string
Returns the unmodified JSON received from the API
func (EVMChainData) ToParam ¶
func (r EVMChainData) ToParam() EVMChainDataParam
ToParam converts this EVMChainData to a EVMChainDataParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EVMChainDataParam.Overrides()
func (*EVMChainData) UnmarshalJSON ¶
func (r *EVMChainData) UnmarshalJSON(data []byte) error
type EVMChainDataParam ¶
type EVMChainDataParam struct {
// Chain ID
ChainID int64 `json:"chain_id,required"`
// contains filtered or unexported fields
}
Data about an EVM blockchain
The property ChainID is required.
func (EVMChainDataParam) MarshalJSON ¶
func (r EVMChainDataParam) MarshalJSON() (data []byte, err error)
func (*EVMChainDataParam) UnmarshalJSON ¶
func (r *EVMChainDataParam) UnmarshalJSON(data []byte) error
type Execution ¶
type Execution struct {
// An execution ID, represented as a TypeID with `execution` prefix
ID ExecutionID `json:"id,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// An execution request
Request ExecutionRequestUnion `json:"request,required"`
// An execution step ID, represented as a TypeID with `execution_step` prefix
RequestActionStepID string `json:"request_action_step_id,required"`
// The state of an execution
//
// Any of "not_started", "started", "success", "aborted", "error".
State ExecutionState `json:"state,required"`
StepActionURL string `json:"step_action_url,required"`
// A list of execution steps
Steps []ExecutionStep `json:"steps,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Request respjson.Field
RequestActionStepID respjson.Field
State respjson.Field
StepActionURL respjson.Field
Steps respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An execution
func (*Execution) UnmarshalJSON ¶
type ExecutionEVMTransactionEIP1559Payload ¶
type ExecutionEVMTransactionEIP1559Payload struct {
// A hex string starting with 0x
Data HexString `json:"data,required"`
// An EVM address
From AddressEVM `json:"from,required"`
// A hex string starting with 0x
GasLimit HexString `json:"gasLimit,required"`
// A hex string starting with 0x
MaxFeePerGas HexString `json:"maxFeePerGas,required"`
// A hex string starting with 0x
MaxPriorityFeePerGas HexString `json:"maxPriorityFeePerGas,required"`
// A hex string starting with 0x
Nonce HexString `json:"nonce,required"`
// An EVM address
To AddressEVM `json:"to,required"`
// A hex string starting with 0x
Value HexString `json:"value,required"`
// A hex string starting with 0x
ChainID HexString `json:"chainId"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
From respjson.Field
GasLimit respjson.Field
MaxFeePerGas respjson.Field
MaxPriorityFeePerGas respjson.Field
Nonce respjson.Field
To respjson.Field
Value respjson.Field
ChainID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The payload of an EIP-1559 transaction
func (ExecutionEVMTransactionEIP1559Payload) RawJSON ¶
func (r ExecutionEVMTransactionEIP1559Payload) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionEVMTransactionEIP1559Payload) UnmarshalJSON ¶
func (r *ExecutionEVMTransactionEIP1559Payload) UnmarshalJSON(data []byte) error
type ExecutionEVMTransactionState ¶
type ExecutionEVMTransactionState string
The state of an EVM transaction
const ( ExecutionEVMTransactionStateNotStarted ExecutionEVMTransactionState = "not_started" ExecutionEVMTransactionStateSignatureRequired ExecutionEVMTransactionState = "signature_required" ExecutionEVMTransactionStateSigned ExecutionEVMTransactionState = "signed" ExecutionEVMTransactionStateBroadcasted ExecutionEVMTransactionState = "broadcasted" ExecutionEVMTransactionStateConfirmed ExecutionEVMTransactionState = "confirmed" ExecutionEVMTransactionStateError ExecutionEVMTransactionState = "error" )
type ExecutionID ¶
type ExecutionID = string
type ExecutionRequestBuyRequestFull ¶
type ExecutionRequestBuyRequestFull struct {
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// An arbitrary precision decimal represented as a string
ReceiveAmount Decimal `json:"receive_amount,required"`
// On-chain asset (aka token)
ReceiveAsset Asset `json:"receive_asset,required"`
// An arbitrary precision decimal represented as a string
Slippage Decimal `json:"slippage,required"`
// On-chain asset (aka token)
SpendAsset Asset `json:"spend_asset,required"`
// A list of venues
Venues []Venue `json:"venues,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockchain respjson.Field
From respjson.Field
ReceiveAmount respjson.Field
ReceiveAsset respjson.Field
Slippage respjson.Field
SpendAsset respjson.Field
Venues respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A request to buy an asset
func (ExecutionRequestBuyRequestFull) RawJSON ¶
func (r ExecutionRequestBuyRequestFull) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionRequestBuyRequestFull) UnmarshalJSON ¶
func (r *ExecutionRequestBuyRequestFull) UnmarshalJSON(data []byte) error
type ExecutionRequestLendRequestFull ¶
type ExecutionRequestLendRequestFull struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// A list of venues
Venues []Venue `json:"venues,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
Blockchain respjson.Field
From respjson.Field
Venues respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A request to lend an asset
func (ExecutionRequestLendRequestFull) RawJSON ¶
func (r ExecutionRequestLendRequestFull) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionRequestLendRequestFull) UnmarshalJSON ¶
func (r *ExecutionRequestLendRequestFull) UnmarshalJSON(data []byte) error
type ExecutionRequestLendSetCollateralRequestFull ¶
type ExecutionRequestLendSetCollateralRequestFull struct {
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
MarketID LendBorrowMarketID `json:"market_id,required"`
Status bool `json:"status,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockchain respjson.Field
From respjson.Field
MarketID respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A request to set/unset a position as collateral
func (ExecutionRequestLendSetCollateralRequestFull) RawJSON ¶
func (r ExecutionRequestLendSetCollateralRequestFull) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionRequestLendSetCollateralRequestFull) UnmarshalJSON ¶
func (r *ExecutionRequestLendSetCollateralRequestFull) UnmarshalJSON(data []byte) error
type ExecutionRequestLendWithdrawRequestFull ¶
type ExecutionRequestLendWithdrawRequestFull struct {
// An arbitrary precision decimal represented as a string
Amount string `json:"amount,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
MarketID LendBorrowMarketID `json:"market_id,required"`
// On-chain asset (aka token)
Asset ExecutionRequestLendWithdrawRequestFullAsset `json:"asset,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Blockchain respjson.Field
From respjson.Field
MarketID respjson.Field
Asset respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A request to withdraw an asset
func (ExecutionRequestLendWithdrawRequestFull) RawJSON ¶
func (r ExecutionRequestLendWithdrawRequestFull) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionRequestLendWithdrawRequestFull) UnmarshalJSON ¶
func (r *ExecutionRequestLendWithdrawRequestFull) UnmarshalJSON(data []byte) error
type ExecutionRequestLendWithdrawRequestFullAsset ¶
type ExecutionRequestLendWithdrawRequestFullAsset struct {
// An asset ID, represented as a TypeID with `asset` prefix
ID AssetID `json:"id,required"`
// An EVM address
Address string `json:"address,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// Asset's decimal places
Decimals int64 `json:"decimals,required"`
// Asset's name
Name string `json:"name,required"`
// Asset's symbol
Symbol string `json:"symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
Blockchain respjson.Field
Decimals respjson.Field
Name respjson.Field
Symbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
On-chain asset (aka token)
func (ExecutionRequestLendWithdrawRequestFullAsset) RawJSON ¶
func (r ExecutionRequestLendWithdrawRequestFullAsset) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionRequestLendWithdrawRequestFullAsset) UnmarshalJSON ¶
func (r *ExecutionRequestLendWithdrawRequestFullAsset) UnmarshalJSON(data []byte) error
type ExecutionRequestMoveRequestFull ¶
type ExecutionRequestMoveRequestFull struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// An EVM address
To Account `json:"to,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
Blockchain respjson.Field
From respjson.Field
To respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A request to move assets from one account to another
func (ExecutionRequestMoveRequestFull) RawJSON ¶
func (r ExecutionRequestMoveRequestFull) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionRequestMoveRequestFull) UnmarshalJSON ¶
func (r *ExecutionRequestMoveRequestFull) UnmarshalJSON(data []byte) error
type ExecutionRequestSellRequestFull ¶
type ExecutionRequestSellRequestFull struct {
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// On-chain asset (aka token)
ReceiveAsset Asset `json:"receive_asset,required"`
// An arbitrary precision decimal represented as a string
Slippage Decimal `json:"slippage,required"`
// An arbitrary precision decimal represented as a string
SpendAmount Decimal `json:"spend_amount,required"`
// On-chain asset (aka token)
SpendAsset Asset `json:"spend_asset,required"`
// A list of venues
Venues []Venue `json:"venues,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockchain respjson.Field
From respjson.Field
ReceiveAsset respjson.Field
Slippage respjson.Field
SpendAmount respjson.Field
SpendAsset respjson.Field
Venues respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A request to sell an asset
func (ExecutionRequestSellRequestFull) RawJSON ¶
func (r ExecutionRequestSellRequestFull) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionRequestSellRequestFull) UnmarshalJSON ¶
func (r *ExecutionRequestSellRequestFull) UnmarshalJSON(data []byte) error
type ExecutionRequestUnion ¶
type ExecutionRequestUnion struct {
// This field is from variant [ExecutionRequestBuyRequestFull].
Blockchain Blockchain `json:"blockchain"`
// This field is from variant [ExecutionRequestBuyRequestFull].
From Account `json:"from"`
// This field is from variant [ExecutionRequestBuyRequestFull].
ReceiveAmount Decimal `json:"receive_amount"`
// This field is from variant [ExecutionRequestBuyRequestFull].
ReceiveAsset Asset `json:"receive_asset"`
// This field is from variant [ExecutionRequestBuyRequestFull].
Slippage Decimal `json:"slippage"`
// This field is from variant [ExecutionRequestBuyRequestFull].
SpendAsset Asset `json:"spend_asset"`
Venues []Venue `json:"venues"`
Amount string `json:"amount"`
// This field is a union of [Asset], [ExecutionRequestLendWithdrawRequestFullAsset]
Asset ExecutionRequestUnionAsset `json:"asset"`
// This field is from variant [ExecutionRequestLendSetCollateralRequestFull].
MarketID LendBorrowMarketID `json:"market_id"`
// This field is from variant [ExecutionRequestLendSetCollateralRequestFull].
Status bool `json:"status"`
// This field is from variant [ExecutionRequestMoveRequestFull].
To Account `json:"to"`
// This field is from variant [ExecutionRequestSellRequestFull].
SpendAmount Decimal `json:"spend_amount"`
JSON struct {
Blockchain respjson.Field
From respjson.Field
ReceiveAmount respjson.Field
ReceiveAsset respjson.Field
Slippage respjson.Field
SpendAsset respjson.Field
Venues respjson.Field
Amount respjson.Field
Asset respjson.Field
MarketID respjson.Field
Status respjson.Field
To respjson.Field
SpendAmount respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionRequestUnion contains all possible properties and values from ExecutionRequestBuyRequestFull, ExecutionRequestLendRequestFull, ExecutionRequestLendSetCollateralRequestFull, ExecutionRequestLendWithdrawRequestFull, ExecutionRequestMoveRequestFull, ExecutionRequestSellRequestFull, ExecutionRequestWrapRequestFull, ExecutionRequestUnwrapRequestFull.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ExecutionRequestUnion) AsBuyRequestFull ¶
func (u ExecutionRequestUnion) AsBuyRequestFull() (v ExecutionRequestBuyRequestFull)
func (ExecutionRequestUnion) AsLendRequestFull ¶
func (u ExecutionRequestUnion) AsLendRequestFull() (v ExecutionRequestLendRequestFull)
func (ExecutionRequestUnion) AsLendSetCollateralRequestFull ¶
func (u ExecutionRequestUnion) AsLendSetCollateralRequestFull() (v ExecutionRequestLendSetCollateralRequestFull)
func (ExecutionRequestUnion) AsLendWithdrawRequestFull ¶
func (u ExecutionRequestUnion) AsLendWithdrawRequestFull() (v ExecutionRequestLendWithdrawRequestFull)
func (ExecutionRequestUnion) AsMoveRequestFull ¶
func (u ExecutionRequestUnion) AsMoveRequestFull() (v ExecutionRequestMoveRequestFull)
func (ExecutionRequestUnion) AsSellRequestFull ¶
func (u ExecutionRequestUnion) AsSellRequestFull() (v ExecutionRequestSellRequestFull)
func (ExecutionRequestUnion) AsUnwrapRequestFull ¶
func (u ExecutionRequestUnion) AsUnwrapRequestFull() (v ExecutionRequestUnwrapRequestFull)
func (ExecutionRequestUnion) AsWrapRequestFull ¶
func (u ExecutionRequestUnion) AsWrapRequestFull() (v ExecutionRequestWrapRequestFull)
func (ExecutionRequestUnion) RawJSON ¶
func (u ExecutionRequestUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionRequestUnion) UnmarshalJSON ¶
func (r *ExecutionRequestUnion) UnmarshalJSON(data []byte) error
type ExecutionRequestUnionAsset ¶
type ExecutionRequestUnionAsset struct {
// This field is from variant [Asset].
ID AssetID `json:"id"`
Address string `json:"address"`
// This field is from variant [Asset].
Blockchain Blockchain `json:"blockchain"`
Decimals int64 `json:"decimals"`
Name string `json:"name"`
Symbol string `json:"symbol"`
JSON struct {
ID respjson.Field
Address respjson.Field
Blockchain respjson.Field
Decimals respjson.Field
Name respjson.Field
Symbol respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionRequestUnionAsset is an implicit subunion of ExecutionRequestUnion. ExecutionRequestUnionAsset provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ExecutionRequestUnion.
func (*ExecutionRequestUnionAsset) UnmarshalJSON ¶
func (r *ExecutionRequestUnionAsset) UnmarshalJSON(data []byte) error
type ExecutionRequestUnwrapRequestFull ¶
type ExecutionRequestUnwrapRequestFull struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Blockchain respjson.Field
From respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A request to unwrap the wrapped native asset
func (ExecutionRequestUnwrapRequestFull) RawJSON ¶
func (r ExecutionRequestUnwrapRequestFull) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionRequestUnwrapRequestFull) UnmarshalJSON ¶
func (r *ExecutionRequestUnwrapRequestFull) UnmarshalJSON(data []byte) error
type ExecutionRequestWrapRequestFull ¶
type ExecutionRequestWrapRequestFull struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Blockchain respjson.Field
From respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A request to wrap the native asset
func (ExecutionRequestWrapRequestFull) RawJSON ¶
func (r ExecutionRequestWrapRequestFull) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionRequestWrapRequestFull) UnmarshalJSON ¶
func (r *ExecutionRequestWrapRequestFull) UnmarshalJSON(data []byte) error
type ExecutionService ¶
type ExecutionService struct {
Options []option.RequestOption
Steps ExecutionStepService
}
ExecutionService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewExecutionService method instead.
func NewExecutionService ¶
func NewExecutionService(opts ...option.RequestOption) (r ExecutionService)
NewExecutionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ExecutionService) Get ¶
func (r *ExecutionService) Get(ctx context.Context, executionID string, opts ...option.RequestOption) (res *Execution, err error)
Get an execution
func (*ExecutionService) List ¶
func (r *ExecutionService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Execution, err error)
Get a list of executions
type ExecutionState ¶
type ExecutionState string
The state of an execution
const ( ExecutionStateNotStarted ExecutionState = "not_started" ExecutionStateStarted ExecutionState = "started" ExecutionStateSuccess ExecutionState = "success" ExecutionStateAborted ExecutionState = "aborted" ExecutionStateError ExecutionState = "error" )
type ExecutionStep ¶
type ExecutionStep struct {
// An execution step ID, represented as a TypeID with `execution_step` prefix
ID ExecutionStepID `json:"id,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// The definition of an execution step
Definition ExecutionStepDefinitionUnion `json:"definition,required"`
Index int64 `json:"index,required"`
// The type of an execution step
//
// Any of "evm_transaction_approve", "evm_transaction_buy", "evm_transaction_lend",
// "evm_transaction_lend_set_collateral", "evm_transaction_lend_withdraw",
// "evm_transaction_move", "evm_transaction_permission", "evm_transaction_wrap",
// "evm_transaction_unwrap", "evm_transaction_sell".
Type string `json:"type,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Definition respjson.Field
Index respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An execution step
func (ExecutionStep) RawJSON ¶
func (r ExecutionStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStep) UnmarshalJSON ¶
func (r *ExecutionStep) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionApprove ¶
type ExecutionStepDefinitionExecutionEVMTransactionApprove struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepDefinitionExecutionEVMTransactionApproveError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// An EVM address
Spender Account `json:"spender,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
Payload respjson.Field
SignedAt respjson.Field
Spender respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An approval of an asset
func (ExecutionStepDefinitionExecutionEVMTransactionApprove) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionApprove) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionApprove) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionApprove) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionApproveError ¶
type ExecutionStepDefinitionExecutionEVMTransactionApproveError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepDefinitionExecutionEVMTransactionApproveError) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionApproveError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionApproveError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionApproveError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionBuy ¶
type ExecutionStepDefinitionExecutionEVMTransactionBuy struct {
// An EVM address
ApprovalTarget Account `json:"approval_target,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepDefinitionExecutionEVMTransactionBuyError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// An arbitrary precision decimal represented as a string
MaxSpendAmount Decimal `json:"max_spend_amount,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// A buy quote
Quote BuyQuote `json:"quote,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// An arbitrary precision decimal represented as a string
Slippage Decimal `json:"slippage,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ApprovalTarget respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
MaxSpendAmount respjson.Field
Payload respjson.Field
Quote respjson.Field
SignedAt respjson.Field
Slippage respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Buying an asset with another asset
func (ExecutionStepDefinitionExecutionEVMTransactionBuy) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionBuy) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionBuy) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionBuy) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionBuyError ¶
type ExecutionStepDefinitionExecutionEVMTransactionBuyError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepDefinitionExecutionEVMTransactionBuyError) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionBuyError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionBuyError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionBuyError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionLend ¶
type ExecutionStepDefinitionExecutionEVMTransactionLend struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepDefinitionExecutionEVMTransactionLendError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// A venue symbol
VenueSymbol VenueSymbol `json:"venue_symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
LendBorrowMarketID respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
VenueSymbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Lending an asset
func (ExecutionStepDefinitionExecutionEVMTransactionLend) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionLend) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionLend) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionLend) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionLendError ¶
type ExecutionStepDefinitionExecutionEVMTransactionLendError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepDefinitionExecutionEVMTransactionLendError) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionLendError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionLendError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionLendError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral ¶
type ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral struct {
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateralError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
Status bool `json:"status,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
LendBorrowMarketID respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
Status respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Setting/unsetting a position as collateral
func (ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateralError ¶
type ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateralError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateralError) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateralError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateralError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateralError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw ¶
type ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw struct {
// An arbitrary precision decimal represented as a string
Amount string `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepDefinitionExecutionEVMTransactionLendWithdrawError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
LendBorrowMarketID respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Withdrawing an asset
func (ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionLendWithdrawError ¶
type ExecutionStepDefinitionExecutionEVMTransactionLendWithdrawError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepDefinitionExecutionEVMTransactionLendWithdrawError) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionLendWithdrawError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionLendWithdrawError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionLendWithdrawError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionMove ¶
type ExecutionStepDefinitionExecutionEVMTransactionMove struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepDefinitionExecutionEVMTransactionMoveError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To Account `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A move of assets from one account to another
func (ExecutionStepDefinitionExecutionEVMTransactionMove) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionMove) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionMove) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionMove) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionMoveError ¶
type ExecutionStepDefinitionExecutionEVMTransactionMoveError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepDefinitionExecutionEVMTransactionMoveError) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionMoveError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionMoveError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionMoveError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionPermission ¶
type ExecutionStepDefinitionExecutionEVMTransactionPermission struct {
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// An EVM address
ContractAddress AddressEVM `json:"contract_address,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepDefinitionExecutionEVMTransactionPermissionError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
Permission bool `json:"permission,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// An EVM address
Spender Account `json:"spender,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// The type of a permission
//
// Any of "compound_v3_comet".
Type string `json:"type,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
ContractAddress respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
LendBorrowMarketID respjson.Field
Payload respjson.Field
Permission respjson.Field
SignedAt respjson.Field
Spender respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A permission to a contract
func (ExecutionStepDefinitionExecutionEVMTransactionPermission) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionPermission) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionPermission) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionPermission) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionPermissionError ¶
type ExecutionStepDefinitionExecutionEVMTransactionPermissionError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepDefinitionExecutionEVMTransactionPermissionError) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionPermissionError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionPermissionError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionPermissionError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionSell ¶
type ExecutionStepDefinitionExecutionEVMTransactionSell struct {
// An EVM address
ApprovalTarget Account `json:"approval_target,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepDefinitionExecutionEVMTransactionSellError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// An arbitrary precision decimal represented as a string
MinReceiveAmount Decimal `json:"min_receive_amount,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// A sell quote
Quote SellQuote `json:"quote,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// An arbitrary precision decimal represented as a string
Slippage Decimal `json:"slippage,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ApprovalTarget respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
MinReceiveAmount respjson.Field
Payload respjson.Field
Quote respjson.Field
SignedAt respjson.Field
Slippage respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Selling an asset for another asset
func (ExecutionStepDefinitionExecutionEVMTransactionSell) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionSell) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionSell) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionSell) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionSellError ¶
type ExecutionStepDefinitionExecutionEVMTransactionSellError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepDefinitionExecutionEVMTransactionSellError) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionSellError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionSellError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionSellError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionUnwrap ¶
type ExecutionStepDefinitionExecutionEVMTransactionUnwrap struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepDefinitionExecutionEVMTransactionUnwrapError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An unwrap of the wrapped native asset
func (ExecutionStepDefinitionExecutionEVMTransactionUnwrap) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionUnwrap) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionUnwrap) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionUnwrap) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionUnwrapError ¶
type ExecutionStepDefinitionExecutionEVMTransactionUnwrapError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepDefinitionExecutionEVMTransactionUnwrapError) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionUnwrapError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionUnwrapError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionUnwrapError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionWrap ¶
type ExecutionStepDefinitionExecutionEVMTransactionWrap struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepDefinitionExecutionEVMTransactionWrapError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A wrap of the native asset
func (ExecutionStepDefinitionExecutionEVMTransactionWrap) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionWrap) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionWrap) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionWrap) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionExecutionEVMTransactionWrapError ¶
type ExecutionStepDefinitionExecutionEVMTransactionWrapError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepDefinitionExecutionEVMTransactionWrapError) RawJSON ¶
func (r ExecutionStepDefinitionExecutionEVMTransactionWrapError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionExecutionEVMTransactionWrapError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionExecutionEVMTransactionWrapError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionUnion ¶
type ExecutionStepDefinitionUnion struct {
Amount string `json:"amount"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
Asset Asset `json:"asset"`
BlockNumber int64 `json:"block_number"`
BroadcastedAt string `json:"broadcasted_at"`
ConfirmationTarget int64 `json:"confirmation_target"`
ConfirmedAt string `json:"confirmed_at"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
CreatedAt Timestamp `json:"created_at"`
Data string `json:"data"`
EffectiveGasPrice string `json:"effective_gas_price"`
// This field is a union of
// [ExecutionStepDefinitionExecutionEVMTransactionApproveError],
// [ExecutionStepDefinitionExecutionEVMTransactionBuyError],
// [ExecutionStepDefinitionExecutionEVMTransactionLendError],
// [ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateralError],
// [ExecutionStepDefinitionExecutionEVMTransactionLendWithdrawError],
// [ExecutionStepDefinitionExecutionEVMTransactionMoveError],
// [ExecutionStepDefinitionExecutionEVMTransactionPermissionError],
// [ExecutionStepDefinitionExecutionEVMTransactionUnwrapError],
// [ExecutionStepDefinitionExecutionEVMTransactionWrapError],
// [ExecutionStepDefinitionExecutionEVMTransactionSellError]
Error ExecutionStepDefinitionUnionError `json:"error"`
ErroredAt string `json:"errored_at"`
GasUsed string `json:"gas_used"`
Hash string `json:"hash"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload"`
SignedAt string `json:"signed_at"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
Spender Account `json:"spender"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
State ExecutionEVMTransactionState `json:"state"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
TargetState ExecutionEVMTransactionState `json:"target_state"`
To string `json:"to"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
UpdatedAt Timestamp `json:"updated_at"`
Value string `json:"value"`
// This field is from variant [ExecutionStepDefinitionExecutionEVMTransactionBuy].
ApprovalTarget Account `json:"approval_target"`
// This field is from variant [ExecutionStepDefinitionExecutionEVMTransactionBuy].
MaxSpendAmount Decimal `json:"max_spend_amount"`
// This field is a union of [BuyQuote], [SellQuote]
Quote ExecutionStepDefinitionUnionQuote `json:"quote"`
// This field is from variant [ExecutionStepDefinitionExecutionEVMTransactionBuy].
Slippage Decimal `json:"slippage"`
// This field is from variant [ExecutionStepDefinitionExecutionEVMTransactionLend].
LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id"`
// This field is from variant [ExecutionStepDefinitionExecutionEVMTransactionLend].
VenueSymbol VenueSymbol `json:"venue_symbol"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral].
Status bool `json:"status"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionPermission].
ContractAddress AddressEVM `json:"contract_address"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionPermission].
Permission bool `json:"permission"`
// This field is from variant
// [ExecutionStepDefinitionExecutionEVMTransactionPermission].
Type string `json:"type"`
// This field is from variant [ExecutionStepDefinitionExecutionEVMTransactionSell].
MinReceiveAmount Decimal `json:"min_receive_amount"`
JSON struct {
Amount respjson.Field
Asset respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
Payload respjson.Field
SignedAt respjson.Field
Spender respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ApprovalTarget respjson.Field
MaxSpendAmount respjson.Field
Quote respjson.Field
Slippage respjson.Field
LendBorrowMarketID respjson.Field
VenueSymbol respjson.Field
Status respjson.Field
ContractAddress respjson.Field
Permission respjson.Field
Type respjson.Field
MinReceiveAmount respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionStepDefinitionUnion contains all possible properties and values from ExecutionStepDefinitionExecutionEVMTransactionApprove, ExecutionStepDefinitionExecutionEVMTransactionBuy, ExecutionStepDefinitionExecutionEVMTransactionLend, ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral, ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw, ExecutionStepDefinitionExecutionEVMTransactionMove, ExecutionStepDefinitionExecutionEVMTransactionPermission, ExecutionStepDefinitionExecutionEVMTransactionUnwrap, ExecutionStepDefinitionExecutionEVMTransactionWrap, ExecutionStepDefinitionExecutionEVMTransactionSell.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionApprove ¶
func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionApprove() (v ExecutionStepDefinitionExecutionEVMTransactionApprove)
func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionBuy ¶
func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionBuy() (v ExecutionStepDefinitionExecutionEVMTransactionBuy)
func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLend ¶
func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLend() (v ExecutionStepDefinitionExecutionEVMTransactionLend)
func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLendSetCollateral ¶
func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLendSetCollateral() (v ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral)
func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLendWithdraw ¶
func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLendWithdraw() (v ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw)
func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionMove ¶
func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionMove() (v ExecutionStepDefinitionExecutionEVMTransactionMove)
func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionPermission ¶
func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionPermission() (v ExecutionStepDefinitionExecutionEVMTransactionPermission)
func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionSell ¶
func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionSell() (v ExecutionStepDefinitionExecutionEVMTransactionSell)
func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionUnwrap ¶
func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionUnwrap() (v ExecutionStepDefinitionExecutionEVMTransactionUnwrap)
func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionWrap ¶
func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionWrap() (v ExecutionStepDefinitionExecutionEVMTransactionWrap)
func (ExecutionStepDefinitionUnion) RawJSON ¶
func (u ExecutionStepDefinitionUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepDefinitionUnion) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionUnion) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionUnionError ¶
type ExecutionStepDefinitionUnionError struct {
Message string `json:"message"`
Params any `json:"params"`
Type string `json:"type"`
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionStepDefinitionUnionError is an implicit subunion of ExecutionStepDefinitionUnion. ExecutionStepDefinitionUnionError provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ExecutionStepDefinitionUnion.
func (*ExecutionStepDefinitionUnionError) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionUnionError) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionUnionQuote ¶
type ExecutionStepDefinitionUnionQuote struct {
// This field is from variant [BuyQuote].
Blockchain Blockchain `json:"blockchain"`
// This field is a union of [BuyQuoteFeeEstimate], [SellQuoteFeeEstimate]
FeeEstimate ExecutionStepDefinitionUnionQuoteFeeEstimate `json:"fee_estimate"`
QuoteAssetSymbol string `json:"quote_asset_symbol"`
// This field is a union of [BuyQuoteQuoteInfoUnion], [SellQuoteQuoteInfoUnion]
QuoteInfo ExecutionStepDefinitionUnionQuoteQuoteInfo `json:"quote_info"`
QuoteValue string `json:"quote_value"`
// This field is from variant [BuyQuote].
ReceiveAmount Decimal `json:"receive_amount"`
// This field is from variant [BuyQuote].
ReceiveAsset Asset `json:"receive_asset"`
// This field is from variant [BuyQuote].
SpendAmount Decimal `json:"spend_amount"`
// This field is from variant [BuyQuote].
SpendAsset Asset `json:"spend_asset"`
// This field is from variant [BuyQuote].
Venue Venue `json:"venue"`
JSON struct {
Blockchain respjson.Field
FeeEstimate respjson.Field
QuoteAssetSymbol respjson.Field
QuoteInfo respjson.Field
QuoteValue respjson.Field
ReceiveAmount respjson.Field
ReceiveAsset respjson.Field
SpendAmount respjson.Field
SpendAsset respjson.Field
Venue respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionStepDefinitionUnionQuote is an implicit subunion of ExecutionStepDefinitionUnion. ExecutionStepDefinitionUnionQuote provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ExecutionStepDefinitionUnion.
func (*ExecutionStepDefinitionUnionQuote) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionUnionQuote) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionUnionQuoteFeeEstimate ¶
type ExecutionStepDefinitionUnionQuoteFeeEstimate struct {
// This field is from variant [BuyQuoteFeeEstimate].
Amount Decimal `json:"amount"`
// This field is from variant [BuyQuoteFeeEstimate].
Asset Asset `json:"asset"`
Cost string `json:"cost"`
QuoteAssetSymbol string `json:"quote_asset_symbol"`
JSON struct {
Amount respjson.Field
Asset respjson.Field
Cost respjson.Field
QuoteAssetSymbol respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionStepDefinitionUnionQuoteFeeEstimate is an implicit subunion of ExecutionStepDefinitionUnion. ExecutionStepDefinitionUnionQuoteFeeEstimate provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ExecutionStepDefinitionUnion.
func (*ExecutionStepDefinitionUnionQuoteFeeEstimate) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionUnionQuoteFeeEstimate) UnmarshalJSON(data []byte) error
type ExecutionStepDefinitionUnionQuoteQuoteInfo ¶
type ExecutionStepDefinitionUnionQuoteQuoteInfo struct {
PoolIDs []string `json:"pool_ids"`
// This field is from variant [SellQuoteQuoteInfoUnion].
IIndex int64 `json:"i_index"`
// This field is from variant [SellQuoteQuoteInfoUnion].
JIndex int64 `json:"j_index"`
// This field is from variant [SellQuoteQuoteInfoUnion].
PoolID string `json:"pool_id"`
// This field is from variant [SellQuoteQuoteInfoUnion].
SwapType string `json:"swap_type"`
// This field is from variant [SellQuoteQuoteInfoUnion].
EstimatedGasUsed string `json:"estimated_gas_used"`
// This field is from variant [SellQuoteQuoteInfoUnion].
Route QuoteInfo0xRoute `json:"route"`
JSON struct {
PoolIDs respjson.Field
IIndex respjson.Field
JIndex respjson.Field
PoolID respjson.Field
SwapType respjson.Field
EstimatedGasUsed respjson.Field
Route respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionStepDefinitionUnionQuoteQuoteInfo is an implicit subunion of ExecutionStepDefinitionUnion. ExecutionStepDefinitionUnionQuoteQuoteInfo provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ExecutionStepDefinitionUnion.
func (*ExecutionStepDefinitionUnionQuoteQuoteInfo) UnmarshalJSON ¶
func (r *ExecutionStepDefinitionUnionQuoteQuoteInfo) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponse ¶
type ExecutionStepGetResponse struct {
// An execution step ID, represented as a TypeID with `execution_step` prefix
ID ExecutionStepID `json:"id,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// The definition of an execution step
Definition ExecutionStepGetResponseDefinitionUnion `json:"definition,required"`
Index int64 `json:"index,required"`
// The type of an execution step
//
// Any of "evm_transaction_approve", "evm_transaction_buy", "evm_transaction_lend",
// "evm_transaction_lend_set_collateral", "evm_transaction_lend_withdraw",
// "evm_transaction_move", "evm_transaction_permission", "evm_transaction_wrap",
// "evm_transaction_unwrap", "evm_transaction_sell".
Type ExecutionStepGetResponseType `json:"type,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Definition respjson.Field
Index respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An execution step
func (ExecutionStepGetResponse) RawJSON ¶
func (r ExecutionStepGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponse) UnmarshalJSON ¶
func (r *ExecutionStepGetResponse) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepGetResponseDefinitionExecutionEVMTransactionApproveError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// An EVM address
Spender Account `json:"spender,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
Payload respjson.Field
SignedAt respjson.Field
Spender respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An approval of an asset
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionApproveError ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionApproveError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionApproveError) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionApproveError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionApproveError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionApproveError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy struct {
// An EVM address
ApprovalTarget Account `json:"approval_target,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuyError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// An arbitrary precision decimal represented as a string
MaxSpendAmount Decimal `json:"max_spend_amount,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// A buy quote
Quote BuyQuote `json:"quote,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// An arbitrary precision decimal represented as a string
Slippage Decimal `json:"slippage,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ApprovalTarget respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
MaxSpendAmount respjson.Field
Payload respjson.Field
Quote respjson.Field
SignedAt respjson.Field
Slippage respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Buying an asset with another asset
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuyError ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuyError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuyError) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuyError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuyError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuyError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// A venue symbol
VenueSymbol VenueSymbol `json:"venue_symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
LendBorrowMarketID respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
VenueSymbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Lending an asset
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendError ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendError) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral struct {
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateralError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
Status bool `json:"status,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
LendBorrowMarketID respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
Status respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Setting/unsetting a position as collateral
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateralError ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateralError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateralError) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateralError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateralError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateralError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw struct {
// An arbitrary precision decimal represented as a string
Amount string `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdrawError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
LendBorrowMarketID respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Withdrawing an asset
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdrawError ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdrawError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdrawError) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdrawError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdrawError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdrawError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepGetResponseDefinitionExecutionEVMTransactionMoveError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To Account `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A move of assets from one account to another
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionMoveError ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionMoveError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionMoveError) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionMoveError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionMoveError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionMoveError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission struct {
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// An EVM address
ContractAddress AddressEVM `json:"contract_address,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermissionError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
Permission bool `json:"permission,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// An EVM address
Spender Account `json:"spender,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// The type of a permission
//
// Any of "compound_v3_comet".
Type string `json:"type,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
ContractAddress respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
LendBorrowMarketID respjson.Field
Payload respjson.Field
Permission respjson.Field
SignedAt respjson.Field
Spender respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A permission to a contract
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermissionError ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermissionError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermissionError) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermissionError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermissionError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermissionError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell struct {
// An EVM address
ApprovalTarget Account `json:"approval_target,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepGetResponseDefinitionExecutionEVMTransactionSellError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// An arbitrary precision decimal represented as a string
MinReceiveAmount Decimal `json:"min_receive_amount,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// A sell quote
Quote SellQuote `json:"quote,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// An arbitrary precision decimal represented as a string
Slippage Decimal `json:"slippage,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ApprovalTarget respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
MinReceiveAmount respjson.Field
Payload respjson.Field
Quote respjson.Field
SignedAt respjson.Field
Slippage respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Selling an asset for another asset
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionSellError ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionSellError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionSellError) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionSellError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionSellError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionSellError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrapError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An unwrap of the wrapped native asset
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrapError ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrapError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrapError) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrapError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrapError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrapError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
BlockNumber int64 `json:"block_number,required"`
// ISO8601 Timestamp
BroadcastedAt string `json:"broadcasted_at,required"`
ConfirmationTarget int64 `json:"confirmation_target,required"`
// ISO8601 Timestamp
ConfirmedAt string `json:"confirmed_at,required"`
// ISO8601 Timestamp
CreatedAt Timestamp `json:"created_at,required"`
// A hex string starting with 0x
Data string `json:"data,required"`
// An arbitrary precision decimal represented as a string
EffectiveGasPrice string `json:"effective_gas_price,required"`
// An error
Error ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrapError `json:"error,required"`
// ISO8601 Timestamp
ErroredAt string `json:"errored_at,required"`
// An arbitrary precision decimal represented as a string
GasUsed string `json:"gas_used,required"`
// A transaction hash
Hash string `json:"hash,required"`
// The payload of an EIP-1559 transaction
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
// ISO8601 Timestamp
SignedAt string `json:"signed_at,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
State ExecutionEVMTransactionState `json:"state,required"`
// The state of an EVM transaction
//
// Any of "not_started", "signature_required", "signed", "broadcasted",
// "confirmed", "error".
TargetState ExecutionEVMTransactionState `json:"target_state,required"`
// An EVM address
To string `json:"to,required"`
// ISO8601 Timestamp
UpdatedAt Timestamp `json:"updated_at,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
Payload respjson.Field
SignedAt respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A wrap of the native asset
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrapError ¶
type ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrapError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrapError) RawJSON ¶
func (r ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrapError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrapError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrapError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionUnion ¶
type ExecutionStepGetResponseDefinitionUnion struct {
Amount string `json:"amount"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
Asset Asset `json:"asset"`
BlockNumber int64 `json:"block_number"`
BroadcastedAt string `json:"broadcasted_at"`
ConfirmationTarget int64 `json:"confirmation_target"`
ConfirmedAt string `json:"confirmed_at"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
CreatedAt Timestamp `json:"created_at"`
Data string `json:"data"`
EffectiveGasPrice string `json:"effective_gas_price"`
// This field is a union of
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApproveError],
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuyError],
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendError],
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateralError],
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdrawError],
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionMoveError],
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermissionError],
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrapError],
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrapError],
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionSellError]
Error ExecutionStepGetResponseDefinitionUnionError `json:"error"`
ErroredAt string `json:"errored_at"`
GasUsed string `json:"gas_used"`
Hash string `json:"hash"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
Payload ExecutionEVMTransactionEIP1559Payload `json:"payload"`
SignedAt string `json:"signed_at"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
Spender Account `json:"spender"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
State ExecutionEVMTransactionState `json:"state"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
TargetState ExecutionEVMTransactionState `json:"target_state"`
To string `json:"to"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
UpdatedAt Timestamp `json:"updated_at"`
Value string `json:"value"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy].
ApprovalTarget Account `json:"approval_target"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy].
MaxSpendAmount Decimal `json:"max_spend_amount"`
// This field is a union of [BuyQuote], [SellQuote]
Quote ExecutionStepGetResponseDefinitionUnionQuote `json:"quote"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy].
Slippage Decimal `json:"slippage"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend].
LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend].
VenueSymbol VenueSymbol `json:"venue_symbol"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral].
Status bool `json:"status"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission].
ContractAddress AddressEVM `json:"contract_address"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission].
Permission bool `json:"permission"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission].
Type string `json:"type"`
// This field is from variant
// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell].
MinReceiveAmount Decimal `json:"min_receive_amount"`
JSON struct {
Amount respjson.Field
Asset respjson.Field
BlockNumber respjson.Field
BroadcastedAt respjson.Field
ConfirmationTarget respjson.Field
ConfirmedAt respjson.Field
CreatedAt respjson.Field
Data respjson.Field
EffectiveGasPrice respjson.Field
Error respjson.Field
ErroredAt respjson.Field
GasUsed respjson.Field
Hash respjson.Field
Payload respjson.Field
SignedAt respjson.Field
Spender respjson.Field
State respjson.Field
TargetState respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ApprovalTarget respjson.Field
MaxSpendAmount respjson.Field
Quote respjson.Field
Slippage respjson.Field
LendBorrowMarketID respjson.Field
VenueSymbol respjson.Field
Status respjson.Field
ContractAddress respjson.Field
Permission respjson.Field
Type respjson.Field
MinReceiveAmount respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionStepGetResponseDefinitionUnion contains all possible properties and values from ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove, ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy, ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend, ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral, ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw, ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove, ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission, ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap, ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap, ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionApprove ¶
func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionApprove() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove)
func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionBuy ¶
func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionBuy() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy)
func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLend ¶
func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLend() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend)
func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLendSetCollateral ¶
func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLendSetCollateral() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral)
func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLendWithdraw ¶
func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLendWithdraw() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw)
func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionMove ¶
func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionMove() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove)
func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionPermission ¶
func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionPermission() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission)
func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionSell ¶
func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionSell() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell)
func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionUnwrap ¶
func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionUnwrap() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap)
func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionWrap ¶
func (u ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionWrap() (v ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap)
func (ExecutionStepGetResponseDefinitionUnion) RawJSON ¶
func (u ExecutionStepGetResponseDefinitionUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExecutionStepGetResponseDefinitionUnion) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionUnion) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionUnionError ¶
type ExecutionStepGetResponseDefinitionUnionError struct {
Message string `json:"message"`
Params any `json:"params"`
Type string `json:"type"`
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionStepGetResponseDefinitionUnionError is an implicit subunion of ExecutionStepGetResponseDefinitionUnion. ExecutionStepGetResponseDefinitionUnionError provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ExecutionStepGetResponseDefinitionUnion.
func (*ExecutionStepGetResponseDefinitionUnionError) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionUnionError) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionUnionQuote ¶
type ExecutionStepGetResponseDefinitionUnionQuote struct {
// This field is from variant [BuyQuote].
Blockchain Blockchain `json:"blockchain"`
// This field is a union of [BuyQuoteFeeEstimate], [SellQuoteFeeEstimate]
FeeEstimate ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate `json:"fee_estimate"`
QuoteAssetSymbol string `json:"quote_asset_symbol"`
// This field is a union of [BuyQuoteQuoteInfoUnion], [SellQuoteQuoteInfoUnion]
QuoteInfo ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo `json:"quote_info"`
QuoteValue string `json:"quote_value"`
// This field is from variant [BuyQuote].
ReceiveAmount Decimal `json:"receive_amount"`
// This field is from variant [BuyQuote].
ReceiveAsset Asset `json:"receive_asset"`
// This field is from variant [BuyQuote].
SpendAmount Decimal `json:"spend_amount"`
// This field is from variant [BuyQuote].
SpendAsset Asset `json:"spend_asset"`
// This field is from variant [BuyQuote].
Venue Venue `json:"venue"`
JSON struct {
Blockchain respjson.Field
FeeEstimate respjson.Field
QuoteAssetSymbol respjson.Field
QuoteInfo respjson.Field
QuoteValue respjson.Field
ReceiveAmount respjson.Field
ReceiveAsset respjson.Field
SpendAmount respjson.Field
SpendAsset respjson.Field
Venue respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionStepGetResponseDefinitionUnionQuote is an implicit subunion of ExecutionStepGetResponseDefinitionUnion. ExecutionStepGetResponseDefinitionUnionQuote provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ExecutionStepGetResponseDefinitionUnion.
func (*ExecutionStepGetResponseDefinitionUnionQuote) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionUnionQuote) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate ¶
type ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate struct {
// This field is from variant [BuyQuoteFeeEstimate].
Amount Decimal `json:"amount"`
// This field is from variant [BuyQuoteFeeEstimate].
Asset Asset `json:"asset"`
Cost string `json:"cost"`
QuoteAssetSymbol string `json:"quote_asset_symbol"`
JSON struct {
Amount respjson.Field
Asset respjson.Field
Cost respjson.Field
QuoteAssetSymbol respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate is an implicit subunion of ExecutionStepGetResponseDefinitionUnion. ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ExecutionStepGetResponseDefinitionUnion.
func (*ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo ¶
type ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo struct {
PoolIDs []string `json:"pool_ids"`
// This field is from variant [SellQuoteQuoteInfoUnion].
IIndex int64 `json:"i_index"`
// This field is from variant [SellQuoteQuoteInfoUnion].
JIndex int64 `json:"j_index"`
// This field is from variant [SellQuoteQuoteInfoUnion].
PoolID string `json:"pool_id"`
// This field is from variant [SellQuoteQuoteInfoUnion].
SwapType string `json:"swap_type"`
// This field is from variant [SellQuoteQuoteInfoUnion].
EstimatedGasUsed string `json:"estimated_gas_used"`
// This field is from variant [SellQuoteQuoteInfoUnion].
Route QuoteInfo0xRoute `json:"route"`
JSON struct {
PoolIDs respjson.Field
IIndex respjson.Field
JIndex respjson.Field
PoolID respjson.Field
SwapType respjson.Field
EstimatedGasUsed respjson.Field
Route respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo is an implicit subunion of ExecutionStepGetResponseDefinitionUnion. ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ExecutionStepGetResponseDefinitionUnion.
func (*ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo) UnmarshalJSON ¶
func (r *ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo) UnmarshalJSON(data []byte) error
type ExecutionStepGetResponseType ¶
type ExecutionStepGetResponseType string
The type of an execution step
const ( ExecutionStepGetResponseTypeEVMTransactionApprove ExecutionStepGetResponseType = "evm_transaction_approve" ExecutionStepGetResponseTypeEVMTransactionBuy ExecutionStepGetResponseType = "evm_transaction_buy" ExecutionStepGetResponseTypeEVMTransactionLend ExecutionStepGetResponseType = "evm_transaction_lend" ExecutionStepGetResponseTypeEVMTransactionLendSetCollateral ExecutionStepGetResponseType = "evm_transaction_lend_set_collateral" ExecutionStepGetResponseTypeEVMTransactionLendWithdraw ExecutionStepGetResponseType = "evm_transaction_lend_withdraw" ExecutionStepGetResponseTypeEVMTransactionMove ExecutionStepGetResponseType = "evm_transaction_move" ExecutionStepGetResponseTypeEVMTransactionPermission ExecutionStepGetResponseType = "evm_transaction_permission" ExecutionStepGetResponseTypeEVMTransactionWrap ExecutionStepGetResponseType = "evm_transaction_wrap" ExecutionStepGetResponseTypeEVMTransactionUnwrap ExecutionStepGetResponseType = "evm_transaction_unwrap" ExecutionStepGetResponseTypeEVMTransactionSell ExecutionStepGetResponseType = "evm_transaction_sell" )
type ExecutionStepID ¶
type ExecutionStepID = string
type ExecutionStepService ¶
type ExecutionStepService struct {
Options []option.RequestOption
}
ExecutionStepService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewExecutionStepService method instead.
func NewExecutionStepService ¶
func NewExecutionStepService(opts ...option.RequestOption) (r ExecutionStepService)
NewExecutionStepService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ExecutionStepService) Get ¶
func (r *ExecutionStepService) Get(ctx context.Context, executionID string, stepID string, opts ...option.RequestOption) (res *ExecutionStepGetResponse, err error)
Get a step of an execution
func (*ExecutionStepService) Sign ¶
func (r *ExecutionStepService) Sign(ctx context.Context, executionID string, stepID string, body ExecutionStepSignParams, opts ...option.RequestOption) (err error)
Sign an EVM transaction step
type ExecutionStepSignParams ¶
type ExecutionStepSignParams struct {
// A hex string starting with 0x
SignedPayload HexString `json:"signed_payload,required"`
// contains filtered or unexported fields
}
func (ExecutionStepSignParams) MarshalJSON ¶
func (r ExecutionStepSignParams) MarshalJSON() (data []byte, err error)
func (*ExecutionStepSignParams) UnmarshalJSON ¶
func (r *ExecutionStepSignParams) UnmarshalJSON(data []byte) error
type IncentivizeListParams ¶
type IncentivizeListParams struct {
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
func (IncentivizeListParams) MarshalJSON ¶
func (r IncentivizeListParams) MarshalJSON() (data []byte, err error)
func (*IncentivizeListParams) UnmarshalJSON ¶
func (r *IncentivizeListParams) UnmarshalJSON(data []byte) error
type IncentivizeListResponse ¶
type IncentivizeListResponse struct {
// A list of lp pool incentive markets
Items []IncentivizeMarket `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IncentivizeListResponse) RawJSON ¶
func (r IncentivizeListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*IncentivizeListResponse) UnmarshalJSON ¶
func (r *IncentivizeListResponse) UnmarshalJSON(data []byte) error
type IncentivizeMarket ¶
type IncentivizeMarket struct {
// A list of arbitrary precision decimals
Amounts []Decimal `json:"amounts,required"`
// Response for multiple assets
Assets []Asset `json:"assets,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// ISO8601 Timestamp
ClosedAt Timestamp `json:"closed_at,required"`
// A liquidity pool
Pool LPPool `json:"pool,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// The round number
Round int64 `json:"round,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amounts respjson.Field
Assets respjson.Field
Blockstamp respjson.Field
ClosedAt respjson.Field
Pool respjson.Field
QuoteAssetSymbol respjson.Field
Round respjson.Field
Value respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A lp pool incentive market
func (IncentivizeMarket) RawJSON ¶
func (r IncentivizeMarket) RawJSON() string
Returns the unmodified JSON received from the API
func (*IncentivizeMarket) UnmarshalJSON ¶
func (r *IncentivizeMarket) UnmarshalJSON(data []byte) error
type IncentivizeService ¶
type IncentivizeService struct {
Options []option.RequestOption
}
IncentivizeService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIncentivizeService method instead.
func NewIncentivizeService ¶
func NewIncentivizeService(opts ...option.RequestOption) (r IncentivizeService)
NewIncentivizeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IncentivizeService) List ¶
func (r *IncentivizeService) List(ctx context.Context, body IncentivizeListParams, opts ...option.RequestOption) (res *IncentivizeListResponse, err error)
List the current incentive markets
type LPDepositQuoteNewParams ¶
type LPDepositQuoteNewParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for simulating a deposit to a liquidity pool, creating a position
OfLPPoolDepositQuoteRequestInput *LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for simulating a deposit to a liquidity pool, adding to an existing
// position
OfLPPositionDepositQuoteRequestInput *LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput `json:",inline"`
// contains filtered or unexported fields
}
func (LPDepositQuoteNewParams) MarshalJSON ¶
func (u LPDepositQuoteNewParams) MarshalJSON() ([]byte, error)
func (*LPDepositQuoteNewParams) UnmarshalJSON ¶
func (r *LPDepositQuoteNewParams) UnmarshalJSON(data []byte) error
type LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput ¶
type LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// An asset ID, represented as a TypeID with `asset` prefix
Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A LP pool ID, represented as a TypeID with `lp_pool` prefix
LPPoolID string `json:"lp_pool_id,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// A Uniswap V3 range. Lower and upper bounds should satisfy 0 <= `lower` <
// `upper`. The value -1 can be used in `upper` for infinity
Range LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange `json:"range,omitzero"`
// contains filtered or unexported fields
}
Parameters for simulating a deposit to a liquidity pool, creating a position
The properties Amount, Asset, Blockchain, LPPoolID are required.
func (LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput) MarshalJSON ¶
func (r LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput) MarshalJSON() (data []byte, err error)
func (*LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput) UnmarshalJSON ¶
func (r *LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput) UnmarshalJSON(data []byte) error
type LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange ¶
type LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange struct {
// An arbitrary precision decimal represented as a string
Lower Decimal `json:"lower,required"`
// An arbitrary precision decimal represented as a string
Upper Decimal `json:"upper,required"`
// contains filtered or unexported fields
}
A Uniswap V3 range. Lower and upper bounds should satisfy 0 <= `lower` < `upper`. The value -1 can be used in `upper` for infinity
The properties Lower, Upper are required.
func (LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange) MarshalJSON ¶
func (r LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange) MarshalJSON() (data []byte, err error)
func (*LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange) UnmarshalJSON ¶
func (r *LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange) UnmarshalJSON(data []byte) error
type LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput ¶
type LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput struct {
// An EVM address
Account Account `json:"account,required"`
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// An asset ID, represented as a TypeID with `asset` prefix
Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A LP pool ID, represented as a TypeID with `lp_pool` prefix
LPPoolID string `json:"lp_pool_id,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Uniswap position specifier
Specifier LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier `json:"specifier,omitzero"`
// contains filtered or unexported fields
}
Parameters for simulating a deposit to a liquidity pool, adding to an existing position
The properties Account, Amount, Asset, Blockchain, LPPoolID are required.
func (LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput) MarshalJSON ¶
func (r LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput) MarshalJSON() (data []byte, err error)
func (*LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput) UnmarshalJSON ¶
func (r *LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput) UnmarshalJSON(data []byte) error
type LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier ¶
type LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier struct {
// A NFT
PositionNFT NFTParam `json:"position_nft,omitzero,required"`
// contains filtered or unexported fields
}
Uniswap position specifier
The property PositionNFT is required.
func (LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier) MarshalJSON ¶
func (r LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier) MarshalJSON() (data []byte, err error)
func (*LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier) UnmarshalJSON ¶
func (r *LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier) UnmarshalJSON(data []byte) error
type LPDepositQuoteNewResponse ¶
type LPDepositQuoteNewResponse struct {
// An LP quote
Items LPQuote `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LPDepositQuoteNewResponse) RawJSON ¶
func (r LPDepositQuoteNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPDepositQuoteNewResponse) UnmarshalJSON ¶
func (r *LPDepositQuoteNewResponse) UnmarshalJSON(data []byte) error
type LPDepositQuoteService ¶
type LPDepositQuoteService struct {
Options []option.RequestOption
}
LPDepositQuoteService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLPDepositQuoteService method instead.
func NewLPDepositQuoteService ¶
func NewLPDepositQuoteService(opts ...option.RequestOption) (r LPDepositQuoteService)
NewLPDepositQuoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LPDepositQuoteService) New ¶
func (r *LPDepositQuoteService) New(ctx context.Context, body LPDepositQuoteNewParams, opts ...option.RequestOption) (res *LPDepositQuoteNewResponse, err error)
Simulate depositing liquidity to a specific LP pool, creating a position or adding to an existing one.
type LPPool ¶
type LPPool struct {
// A LP pool ID, represented as a TypeID with `lp_pool` prefix
ID string `json:"id,required"`
// Response for multiple assets
Assets []Asset `json:"assets,required"`
// Pool attributes that are specific to particular venue types
Attributes LPPoolAttributesUnion `json:"attributes,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// An EVM address
PoolAddress Account `json:"pool_address,required"`
// An arbitrary precision decimal represented as a string
PoolFee Decimal `json:"pool_fee,required"`
// Type of a liquidity pool
//
// Any of "pair", "multi", "weighted", "range".
PoolType LPPoolPoolType `json:"pool_type,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// A list of arbitrary precision decimals
ReserveAmounts []Decimal `json:"reserve_amounts,required"`
// A list of arbitrary precision decimals
ReserveRatios []Decimal `json:"reserve_ratios,required"`
// An arbitrary precision decimal represented as a string
TotalLiquidity string `json:"total_liquidity,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Assets respjson.Field
Attributes respjson.Field
Blockstamp respjson.Field
PoolAddress respjson.Field
PoolFee respjson.Field
PoolType respjson.Field
QuoteAssetSymbol respjson.Field
ReserveAmounts respjson.Field
ReserveRatios respjson.Field
TotalLiquidity respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A liquidity pool
func (*LPPool) UnmarshalJSON ¶
type LPPoolAttributesUnion ¶
type LPPoolAttributesUnion struct {
// This field is from variant [LPPoolUniswapV3Attributes].
Fee string `json:"fee"`
// This field is from variant [LPPoolSolidlyAttributes].
Stable bool `json:"stable"`
JSON struct {
Fee respjson.Field
Stable respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
LPPoolAttributesUnion contains all possible properties and values from LPPoolUniswapV3Attributes, LPPoolSolidlyAttributes.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (LPPoolAttributesUnion) AsLPPoolSolidlyAttributes ¶
func (u LPPoolAttributesUnion) AsLPPoolSolidlyAttributes() (v LPPoolSolidlyAttributes)
func (LPPoolAttributesUnion) AsLPPoolUniswapV3Attributes ¶
func (u LPPoolAttributesUnion) AsLPPoolUniswapV3Attributes() (v LPPoolUniswapV3Attributes)
func (LPPoolAttributesUnion) RawJSON ¶
func (u LPPoolAttributesUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPoolAttributesUnion) UnmarshalJSON ¶
func (r *LPPoolAttributesUnion) UnmarshalJSON(data []byte) error
type LPPoolListHistoricalParams ¶
type LPPoolListHistoricalParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for querying LP pools by venues and assets
OfHistoricalLPPoolsByVenueAssetRequest *LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for querying LP pools by IDs
OfHistoricalLPPoolsByIDsRequest *LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest `json:",inline"`
// contains filtered or unexported fields
}
func (LPPoolListHistoricalParams) MarshalJSON ¶
func (u LPPoolListHistoricalParams) MarshalJSON() ([]byte, error)
func (*LPPoolListHistoricalParams) UnmarshalJSON ¶
func (r *LPPoolListHistoricalParams) UnmarshalJSON(data []byte) error
type LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest ¶
type LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// A list of LP pool IDs
LPPoolIDs []string `json:"lp_pool_ids,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying LP pools by IDs
The properties Blockchain, From, LPPoolIDs, To are required.
func (LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest) MarshalJSON ¶
func (r LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest) MarshalJSON() (data []byte, err error)
func (*LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest) UnmarshalJSON ¶
func (r *LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest) UnmarshalJSON(data []byte) error
type LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest ¶
type LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest struct {
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying LP pools by venues and assets
The properties Assets, Blockchain, From, To, Venues are required.
func (LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest) MarshalJSON ¶
func (r LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest) MarshalJSON() (data []byte, err error)
func (*LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest) UnmarshalJSON ¶
func (r *LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest) UnmarshalJSON(data []byte) error
type LPPoolListHistoricalResponse ¶
type LPPoolListHistoricalResponse struct {
// A range of blockstamps
Historical OnChainHistoricalRange `json:"historical,required"`
Items []LPPoolListHistoricalResponseItem `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Historical respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LPPoolListHistoricalResponse) RawJSON ¶
func (r LPPoolListHistoricalResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPoolListHistoricalResponse) UnmarshalJSON ¶
func (r *LPPoolListHistoricalResponse) UnmarshalJSON(data []byte) error
type LPPoolListHistoricalResponseItem ¶
type LPPoolListHistoricalResponseItem struct {
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// A list of liquidity pools
Items []LPPool `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockstamp respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LPPoolListHistoricalResponseItem) RawJSON ¶
func (r LPPoolListHistoricalResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPoolListHistoricalResponseItem) UnmarshalJSON ¶
func (r *LPPoolListHistoricalResponseItem) UnmarshalJSON(data []byte) error
type LPPoolListParams ¶
type LPPoolListParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for querying LP pools by venues and assets
OfLPPoolsByVenueAssetRequestInput *LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for querying LP pools by IDs
OfLPPoolsByIDsRequestInput *LPPoolListParamsBodyLPPoolsByIDsRequestInput `json:",inline"`
// contains filtered or unexported fields
}
func (LPPoolListParams) MarshalJSON ¶
func (u LPPoolListParams) MarshalJSON() ([]byte, error)
func (*LPPoolListParams) UnmarshalJSON ¶
func (r *LPPoolListParams) UnmarshalJSON(data []byte) error
type LPPoolListParamsBodyLPPoolsByIDsRequestInput ¶
type LPPoolListParamsBodyLPPoolsByIDsRequestInput struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of LP pool IDs
LPPoolIDs []string `json:"lp_pool_ids,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying LP pools by IDs
The properties Blockchain, LPPoolIDs are required.
func (LPPoolListParamsBodyLPPoolsByIDsRequestInput) MarshalJSON ¶
func (r LPPoolListParamsBodyLPPoolsByIDsRequestInput) MarshalJSON() (data []byte, err error)
func (*LPPoolListParamsBodyLPPoolsByIDsRequestInput) UnmarshalJSON ¶
func (r *LPPoolListParamsBodyLPPoolsByIDsRequestInput) UnmarshalJSON(data []byte) error
type LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion ¶
type LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion) MarshalJSON ¶
func (u LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion) UnmarshalJSON ¶
func (u *LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion) UnmarshalJSON(data []byte) error
type LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput ¶
type LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput struct {
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying LP pools by venues and assets
The properties Assets, Blockchain, Venues are required.
func (LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput) MarshalJSON ¶
func (r LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput) MarshalJSON() (data []byte, err error)
func (*LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput) UnmarshalJSON ¶
func (r *LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput) UnmarshalJSON(data []byte) error
type LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion ¶
type LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion) MarshalJSON ¶
func (u LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion) UnmarshalJSON ¶
func (u *LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion) UnmarshalJSON(data []byte) error
type LPPoolListResponse ¶
type LPPoolListResponse struct {
// A list of liquidity pools
Items []LPPool `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LPPoolListResponse) RawJSON ¶
func (r LPPoolListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPoolListResponse) UnmarshalJSON ¶
func (r *LPPoolListResponse) UnmarshalJSON(data []byte) error
type LPPoolPoolType ¶
type LPPoolPoolType string
Type of a liquidity pool
const ( LPPoolPoolTypePair LPPoolPoolType = "pair" LPPoolPoolTypeMulti LPPoolPoolType = "multi" LPPoolPoolTypeWeighted LPPoolPoolType = "weighted" LPPoolPoolTypeRange LPPoolPoolType = "range" )
type LPPoolService ¶
type LPPoolService struct {
Options []option.RequestOption
}
LPPoolService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLPPoolService method instead.
func NewLPPoolService ¶
func NewLPPoolService(opts ...option.RequestOption) (r LPPoolService)
NewLPPoolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LPPoolService) List ¶
func (r *LPPoolService) List(ctx context.Context, body LPPoolListParams, opts ...option.RequestOption) (res *LPPoolListResponse, err error)
Get a list of LP pools
func (*LPPoolService) ListHistorical ¶
func (r *LPPoolService) ListHistorical(ctx context.Context, body LPPoolListHistoricalParams, opts ...option.RequestOption) (res *LPPoolListHistoricalResponse, err error)
Get a list of LP pools
type LPPoolSolidlyAttributes ¶
type LPPoolSolidlyAttributes struct {
// True if pool is stable, false if volatile
Stable bool `json:"stable,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Stable respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Attributes for Solidly venue type pools
func (LPPoolSolidlyAttributes) RawJSON ¶
func (r LPPoolSolidlyAttributes) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPoolSolidlyAttributes) UnmarshalJSON ¶
func (r *LPPoolSolidlyAttributes) UnmarshalJSON(data []byte) error
type LPPoolUniswapV3Attributes ¶
type LPPoolUniswapV3Attributes struct {
// Pool fee
Fee string `json:"fee,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Fee respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Attributes for Uniswap V3 venue type pools
func (LPPoolUniswapV3Attributes) RawJSON ¶
func (r LPPoolUniswapV3Attributes) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPoolUniswapV3Attributes) UnmarshalJSON ¶
func (r *LPPoolUniswapV3Attributes) UnmarshalJSON(data []byte) error
type LPPosition ¶
type LPPosition struct {
// An EVM address
Account Account `json:"account,required"`
// A list of arbitrary precision decimals
Amounts []Decimal `json:"amounts,required"`
// Attributes for Uniswap V3 venue type positions
Attributes LPPositionAttributes `json:"attributes,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// An arbitrary precision decimal represented as a string
LPAmount Decimal `json:"lp_amount,required"`
// An LP asset, either an Asset or a NFT
LPAsset LPPositionLPAssetUnion `json:"lp_asset,required"`
// An arbitrary precision decimal represented as a string
Ownership string `json:"ownership,required"`
// A liquidity pool
Pool LPPool `json:"pool,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Amounts respjson.Field
Attributes respjson.Field
Blockstamp respjson.Field
LPAmount respjson.Field
LPAsset respjson.Field
Ownership respjson.Field
Pool respjson.Field
QuoteAssetSymbol respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A position in a liquidity pool
func (LPPosition) RawJSON ¶
func (r LPPosition) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPosition) UnmarshalJSON ¶
func (r *LPPosition) UnmarshalJSON(data []byte) error
type LPPositionAttributes ¶
type LPPositionAttributes struct {
// Whether the position is in range
InRange bool `json:"in_range,required"`
// An arbitrary precision decimal represented as a string
Lower Decimal `json:"lower,required"`
// An arbitrary precision decimal represented as a string
Price Decimal `json:"price,required"`
// Lower tick
TickLower int64 `json:"tick_lower,required"`
// Upper tick
TickUpper int64 `json:"tick_upper,required"`
// An arbitrary precision decimal represented as a string
Upper Decimal `json:"upper,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
InRange respjson.Field
Lower respjson.Field
Price respjson.Field
TickLower respjson.Field
TickUpper respjson.Field
Upper respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Attributes for Uniswap V3 venue type positions
func (LPPositionAttributes) RawJSON ¶
func (r LPPositionAttributes) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPositionAttributes) UnmarshalJSON ¶
func (r *LPPositionAttributes) UnmarshalJSON(data []byte) error
type LPPositionLPAssetUnion ¶
type LPPositionLPAssetUnion struct {
// This field is a union of [AssetID], [int64]
ID LPPositionLPAssetUnionID `json:"id"`
// This field is from variant [Asset].
Address string `json:"address"`
// This field is from variant [Asset].
Blockchain Blockchain `json:"blockchain"`
// This field is from variant [Asset].
Decimals int64 `json:"decimals"`
// This field is from variant [Asset].
Name string `json:"name"`
// This field is from variant [Asset].
Symbol string `json:"symbol"`
// This field is from variant [NFT].
Collection NFTCollection `json:"collection"`
JSON struct {
ID respjson.Field
Address respjson.Field
Blockchain respjson.Field
Decimals respjson.Field
Name respjson.Field
Symbol respjson.Field
Collection respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
LPPositionLPAssetUnion contains all possible properties and values from Asset, NFT.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (LPPositionLPAssetUnion) AsAsset ¶
func (u LPPositionLPAssetUnion) AsAsset() (v Asset)
func (LPPositionLPAssetUnion) AsNFT ¶
func (u LPPositionLPAssetUnion) AsNFT() (v NFT)
func (LPPositionLPAssetUnion) RawJSON ¶
func (u LPPositionLPAssetUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPositionLPAssetUnion) UnmarshalJSON ¶
func (r *LPPositionLPAssetUnion) UnmarshalJSON(data []byte) error
type LPPositionLPAssetUnionID ¶
type LPPositionLPAssetUnionID struct {
// This field will be present if the value is a [AssetID] instead of an object.
OfString AssetID `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
LPPositionLPAssetUnionID is an implicit subunion of LPPositionLPAssetUnion. LPPositionLPAssetUnionID provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the LPPositionLPAssetUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]
func (*LPPositionLPAssetUnionID) UnmarshalJSON ¶
func (r *LPPositionLPAssetUnionID) UnmarshalJSON(data []byte) error
type LPPositionListHistoricalParams ¶
type LPPositionListHistoricalParams struct {
// This field is a request body variant, only one variant field can be set. A
// request to query positions by blockchain, venues and assets
OfHistoricalLPPositionsByVenueAssetRequest *LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest `json:",inline"`
// This field is a request body variant, only one variant field can be set. A
// request to query positions by pool ids
OfHistoricalLPPositionsByPoolIDsRequest *LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest `json:",inline"`
// contains filtered or unexported fields
}
func (LPPositionListHistoricalParams) MarshalJSON ¶
func (u LPPositionListHistoricalParams) MarshalJSON() ([]byte, error)
func (*LPPositionListHistoricalParams) UnmarshalJSON ¶
func (r *LPPositionListHistoricalParams) UnmarshalJSON(data []byte) error
type LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest ¶
type LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// A list of LP pool IDs
LPPoolIDs []string `json:"lp_pool_ids,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Whether to exclude empty positions
ExcludeZeros param.Opt[bool] `json:"exclude_zeros,omitzero"`
// contains filtered or unexported fields
}
A request to query positions by pool ids
The properties Accounts, Blockchain, From, LPPoolIDs, To are required.
func (LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest) MarshalJSON ¶
func (r LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest) MarshalJSON() (data []byte, err error)
func (*LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest) UnmarshalJSON ¶
func (r *LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest) UnmarshalJSON(data []byte) error
type LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest ¶
type LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Whether to exclude empty positions
ExcludeZeros param.Opt[bool] `json:"exclude_zeros,omitzero"`
// contains filtered or unexported fields
}
A request to query positions by blockchain, venues and assets
The properties Accounts, Assets, Blockchain, From, To, Venues are required.
func (LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest) MarshalJSON ¶
func (r LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest) MarshalJSON() (data []byte, err error)
func (*LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest) UnmarshalJSON ¶
func (r *LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest) UnmarshalJSON(data []byte) error
type LPPositionListHistoricalResponse ¶
type LPPositionListHistoricalResponse struct {
// A range of blockstamps
Historical OnChainHistoricalRange `json:"historical,required"`
Items []LPPositionListHistoricalResponseItem `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Historical respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LPPositionListHistoricalResponse) RawJSON ¶
func (r LPPositionListHistoricalResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPositionListHistoricalResponse) UnmarshalJSON ¶
func (r *LPPositionListHistoricalResponse) UnmarshalJSON(data []byte) error
type LPPositionListHistoricalResponseItem ¶
type LPPositionListHistoricalResponseItem struct {
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// A list of liquidity pool positions
Items []LPPosition `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockstamp respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LPPositionListHistoricalResponseItem) RawJSON ¶
func (r LPPositionListHistoricalResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPositionListHistoricalResponseItem) UnmarshalJSON ¶
func (r *LPPositionListHistoricalResponseItem) UnmarshalJSON(data []byte) error
type LPPositionListParams ¶
type LPPositionListParams struct {
// This field is a request body variant, only one variant field can be set. A
// request to query positions by blockchain, venues and assets
OfLPPositionsByVenueAssetRequestInput *LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput `json:",inline"`
// This field is a request body variant, only one variant field can be set. A
// request to query positions by pool ids
OfLPPositionsByPoolIDsRequestInput *LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput `json:",inline"`
// contains filtered or unexported fields
}
func (LPPositionListParams) MarshalJSON ¶
func (u LPPositionListParams) MarshalJSON() ([]byte, error)
func (*LPPositionListParams) UnmarshalJSON ¶
func (r *LPPositionListParams) UnmarshalJSON(data []byte) error
type LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput ¶
type LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of LP pool IDs
LPPoolIDs []string `json:"lp_pool_ids,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Whether to exclude empty positions
ExcludeZeros param.Opt[bool] `json:"exclude_zeros,omitzero"`
// Either a ISO8601 timestamp or a block number
At LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
A request to query positions by pool ids
The properties Accounts, Blockchain, LPPoolIDs are required.
func (LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput) MarshalJSON ¶
func (r LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput) MarshalJSON() (data []byte, err error)
func (*LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput) UnmarshalJSON ¶
func (r *LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput) UnmarshalJSON(data []byte) error
type LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion ¶
type LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion) MarshalJSON ¶
func (u LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion) UnmarshalJSON ¶
func (u *LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion) UnmarshalJSON(data []byte) error
type LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput ¶
type LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Whether to exclude empty positions
ExcludeZeros param.Opt[bool] `json:"exclude_zeros,omitzero"`
// Either a ISO8601 timestamp or a block number
At LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
A request to query positions by blockchain, venues and assets
The properties Accounts, Assets, Blockchain, Venues are required.
func (LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput) MarshalJSON ¶
func (r LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput) MarshalJSON() (data []byte, err error)
func (*LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput) UnmarshalJSON ¶
func (r *LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput) UnmarshalJSON(data []byte) error
type LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion ¶
type LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion) MarshalJSON ¶
func (u LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion) UnmarshalJSON ¶
func (u *LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion) UnmarshalJSON(data []byte) error
type LPPositionListResponse ¶
type LPPositionListResponse struct {
// A list of liquidity pool positions
Items []LPPosition `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LPPositionListResponse) RawJSON ¶
func (r LPPositionListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPPositionListResponse) UnmarshalJSON ¶
func (r *LPPositionListResponse) UnmarshalJSON(data []byte) error
type LPPositionService ¶
type LPPositionService struct {
Options []option.RequestOption
}
LPPositionService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLPPositionService method instead.
func NewLPPositionService ¶
func NewLPPositionService(opts ...option.RequestOption) (r LPPositionService)
NewLPPositionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LPPositionService) List ¶
func (r *LPPositionService) List(ctx context.Context, body LPPositionListParams, opts ...option.RequestOption) (res *LPPositionListResponse, err error)
Get info on LP positions
func (*LPPositionService) ListHistorical ¶
func (r *LPPositionService) ListHistorical(ctx context.Context, body LPPositionListHistoricalParams, opts ...option.RequestOption) (res *LPPositionListHistoricalResponse, err error)
Get info on LP positions
type LPQuote ¶
type LPQuote struct {
// An EVM address
Account Account `json:"account,required"`
// A list of arbitrary precision decimals
Amounts []Decimal `json:"amounts,required"`
// A list of arbitrary precision decimals
AmountsDelta []Decimal `json:"amounts_delta,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// An arbitrary precision decimal represented as a string
Ownership string `json:"ownership,required"`
// A liquidity pool
Pool LPPool `json:"pool,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Amounts respjson.Field
AmountsDelta respjson.Field
Blockstamp respjson.Field
Ownership respjson.Field
Pool respjson.Field
QuoteAssetSymbol respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An LP quote
func (*LPQuote) UnmarshalJSON ¶
type LPService ¶
type LPService struct {
Options []option.RequestOption
Pools LPPoolService
Positions LPPositionService
DepositQuote LPDepositQuoteService
WithdrawQuote LPWithdrawQuoteService
}
LPService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLPService method instead.
func NewLPService ¶
func NewLPService(opts ...option.RequestOption) (r LPService)
NewLPService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type LPWithdrawQuoteNewParams ¶
type LPWithdrawQuoteNewParams struct {
// An EVM address
Account Account `json:"account,required"`
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// An asset ID, represented as a TypeID with `asset` prefix
Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A LP pool ID, represented as a TypeID with `lp_pool` prefix
LPPoolID string `json:"lp_pool_id,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Uniswap position specifier
Specifier LPWithdrawQuoteNewParamsSpecifier `json:"specifier,omitzero"`
// contains filtered or unexported fields
}
func (LPWithdrawQuoteNewParams) MarshalJSON ¶
func (r LPWithdrawQuoteNewParams) MarshalJSON() (data []byte, err error)
func (*LPWithdrawQuoteNewParams) UnmarshalJSON ¶
func (r *LPWithdrawQuoteNewParams) UnmarshalJSON(data []byte) error
type LPWithdrawQuoteNewParamsSpecifier ¶
type LPWithdrawQuoteNewParamsSpecifier struct {
// A NFT
PositionNFT NFTParam `json:"position_nft,omitzero,required"`
// contains filtered or unexported fields
}
Uniswap position specifier
The property PositionNFT is required.
func (LPWithdrawQuoteNewParamsSpecifier) MarshalJSON ¶
func (r LPWithdrawQuoteNewParamsSpecifier) MarshalJSON() (data []byte, err error)
func (*LPWithdrawQuoteNewParamsSpecifier) UnmarshalJSON ¶
func (r *LPWithdrawQuoteNewParamsSpecifier) UnmarshalJSON(data []byte) error
type LPWithdrawQuoteNewResponse ¶
type LPWithdrawQuoteNewResponse struct {
// An LP quote
Items LPQuote `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LPWithdrawQuoteNewResponse) RawJSON ¶
func (r LPWithdrawQuoteNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LPWithdrawQuoteNewResponse) UnmarshalJSON ¶
func (r *LPWithdrawQuoteNewResponse) UnmarshalJSON(data []byte) error
type LPWithdrawQuoteService ¶
type LPWithdrawQuoteService struct {
Options []option.RequestOption
}
LPWithdrawQuoteService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLPWithdrawQuoteService method instead.
func NewLPWithdrawQuoteService ¶
func NewLPWithdrawQuoteService(opts ...option.RequestOption) (r LPWithdrawQuoteService)
NewLPWithdrawQuoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LPWithdrawQuoteService) New ¶
func (r *LPWithdrawQuoteService) New(ctx context.Context, body LPWithdrawQuoteNewParams, opts ...option.RequestOption) (res *LPWithdrawQuoteNewResponse, err error)
Simulate withdrawing liquidity from a specific existing LP position
type LendBorrowAPYs ¶
type LendBorrowAPYs struct {
// APY Data
Base APY `json:"base,required"`
// Array of APY
Rewards []APY `json:"rewards,required"`
// An arbitrary precision decimal represented as a string
Total Decimal `json:"total,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Base respjson.Field
Rewards respjson.Field
Total respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
APY Data for lend/borrow markets
func (LendBorrowAPYs) RawJSON ¶
func (r LendBorrowAPYs) RawJSON() string
Returns the unmodified JSON received from the API
func (*LendBorrowAPYs) UnmarshalJSON ¶
func (r *LendBorrowAPYs) UnmarshalJSON(data []byte) error
type LendBorrowMarketID ¶
type LendBorrowMarketID = string
type LendLendNewParams ¶
type LendLendNewParams struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// An asset ID, represented as a TypeID with `asset` prefix
Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// contains filtered or unexported fields
}
func (LendLendNewParams) MarshalJSON ¶
func (r LendLendNewParams) MarshalJSON() (data []byte, err error)
func (*LendLendNewParams) UnmarshalJSON ¶
func (r *LendLendNewParams) UnmarshalJSON(data []byte) error
type LendLendService ¶
type LendLendService struct {
Options []option.RequestOption
}
LendLendService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendLendService method instead.
func NewLendLendService ¶
func NewLendLendService(opts ...option.RequestOption) (r LendLendService)
NewLendLendService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LendLendService) New ¶
func (r *LendLendService) New(ctx context.Context, body LendLendNewParams, opts ...option.RequestOption) (res *Execution, err error)
Lend an asset
type LendMarket ¶
type LendMarket struct {
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
ID LendBorrowMarketID `json:"id,required"`
// APY Data for lend/borrow markets
APYs LendBorrowAPYs `json:"apys,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// An arbitrary precision decimal represented as a string
Liquidity Decimal `json:"liquidity,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// An arbitrary precision decimal represented as a string
TotalSupply Decimal `json:"total_supply,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
APYs respjson.Field
Asset respjson.Field
Blockstamp respjson.Field
Liquidity respjson.Field
QuoteAssetSymbol respjson.Field
TotalSupply respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A lend market
func (LendMarket) RawJSON ¶
func (r LendMarket) RawJSON() string
Returns the unmodified JSON received from the API
func (*LendMarket) UnmarshalJSON ¶
func (r *LendMarket) UnmarshalJSON(data []byte) error
type LendMarketListHistoricalParams ¶
type LendMarketListHistoricalParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for querying lend markets by venues and assets
OfHistoricalLendMarketsByVenuesAssetsRequest *LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for querying lend markets by IDs
OfHistoricalLendMarketsByIDsRequest *LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest `json:",inline"`
// contains filtered or unexported fields
}
func (LendMarketListHistoricalParams) MarshalJSON ¶
func (u LendMarketListHistoricalParams) MarshalJSON() ([]byte, error)
func (*LendMarketListHistoricalParams) UnmarshalJSON ¶
func (r *LendMarketListHistoricalParams) UnmarshalJSON(data []byte) error
type LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest ¶
type LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// A list of lend/borrow market IDs
MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying lend markets by IDs
The properties Blockchain, From, MarketIDs, To are required.
func (LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest) MarshalJSON ¶
func (r LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest) MarshalJSON() (data []byte, err error)
func (*LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest) UnmarshalJSON ¶
func (r *LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest) UnmarshalJSON(data []byte) error
type LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest ¶
type LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest struct {
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying lend markets by venues and assets
The properties Assets, Blockchain, From, To, Venues are required.
func (LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest) MarshalJSON ¶
func (r LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest) MarshalJSON() (data []byte, err error)
func (*LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest) UnmarshalJSON ¶
func (r *LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest) UnmarshalJSON(data []byte) error
type LendMarketListHistoricalResponse ¶
type LendMarketListHistoricalResponse struct {
// A range of blockstamps
Historical OnChainHistoricalRange `json:"historical,required"`
Items []LendMarketListHistoricalResponseItem `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Historical respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LendMarketListHistoricalResponse) RawJSON ¶
func (r LendMarketListHistoricalResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LendMarketListHistoricalResponse) UnmarshalJSON ¶
func (r *LendMarketListHistoricalResponse) UnmarshalJSON(data []byte) error
type LendMarketListHistoricalResponseItem ¶
type LendMarketListHistoricalResponseItem struct {
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// A list of lend markets
Items []LendMarket `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockstamp respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LendMarketListHistoricalResponseItem) RawJSON ¶
func (r LendMarketListHistoricalResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*LendMarketListHistoricalResponseItem) UnmarshalJSON ¶
func (r *LendMarketListHistoricalResponseItem) UnmarshalJSON(data []byte) error
type LendMarketListParams ¶
type LendMarketListParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for querying lend markets by venues and assets
OfLendMarketsByVenuesAssetsRequestInput *LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for querying lend markets by IDs
OfLendMarketsByIDsRequestInput *LendMarketListParamsBodyLendMarketsByIDsRequestInput `json:",inline"`
// contains filtered or unexported fields
}
func (LendMarketListParams) MarshalJSON ¶
func (u LendMarketListParams) MarshalJSON() ([]byte, error)
func (*LendMarketListParams) UnmarshalJSON ¶
func (r *LendMarketListParams) UnmarshalJSON(data []byte) error
type LendMarketListParamsBodyLendMarketsByIDsRequestInput ¶
type LendMarketListParamsBodyLendMarketsByIDsRequestInput struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of lend/borrow market IDs
MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying lend markets by IDs
The properties Blockchain, MarketIDs are required.
func (LendMarketListParamsBodyLendMarketsByIDsRequestInput) MarshalJSON ¶
func (r LendMarketListParamsBodyLendMarketsByIDsRequestInput) MarshalJSON() (data []byte, err error)
func (*LendMarketListParamsBodyLendMarketsByIDsRequestInput) UnmarshalJSON ¶
func (r *LendMarketListParamsBodyLendMarketsByIDsRequestInput) UnmarshalJSON(data []byte) error
type LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion ¶
type LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion) MarshalJSON ¶
func (u LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion) UnmarshalJSON ¶
func (u *LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion) UnmarshalJSON(data []byte) error
type LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput ¶
type LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput struct {
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying lend markets by venues and assets
The properties Assets, Blockchain, Venues are required.
func (LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput) MarshalJSON ¶
func (r LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput) MarshalJSON() (data []byte, err error)
func (*LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput) UnmarshalJSON ¶
func (r *LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput) UnmarshalJSON(data []byte) error
type LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion ¶
type LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion) MarshalJSON ¶
func (u LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON ¶
func (u *LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON(data []byte) error
type LendMarketListResponse ¶
type LendMarketListResponse struct {
// A list of lend markets
Items []LendMarket `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LendMarketListResponse) RawJSON ¶
func (r LendMarketListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LendMarketListResponse) UnmarshalJSON ¶
func (r *LendMarketListResponse) UnmarshalJSON(data []byte) error
type LendMarketService ¶
type LendMarketService struct {
Options []option.RequestOption
}
LendMarketService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendMarketService method instead.
func NewLendMarketService ¶
func NewLendMarketService(opts ...option.RequestOption) (r LendMarketService)
NewLendMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LendMarketService) List ¶
func (r *LendMarketService) List(ctx context.Context, body LendMarketListParams, opts ...option.RequestOption) (res *LendMarketListResponse, err error)
Get the current market rates for lending an asset
func (*LendMarketService) ListHistorical ¶
func (r *LendMarketService) ListHistorical(ctx context.Context, body LendMarketListHistoricalParams, opts ...option.RequestOption) (res *LendMarketListHistoricalResponse, err error)
Get the current market rates for lending an asset
type LendPosition ¶
type LendPosition struct {
// An EVM address
Account Account `json:"account,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
CollateralEnabled bool `json:"collateral_enabled,required"`
// A lend market
Market LendMarket `json:"market,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// An arbitrary precision decimal represented as a string
SuppliedAmount Decimal `json:"supplied_amount,required"`
// An arbitrary precision decimal represented as a string
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Blockstamp respjson.Field
CollateralEnabled respjson.Field
Market respjson.Field
QuoteAssetSymbol respjson.Field
SuppliedAmount respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A lend position
func (LendPosition) RawJSON ¶
func (r LendPosition) RawJSON() string
Returns the unmodified JSON received from the API
func (*LendPosition) UnmarshalJSON ¶
func (r *LendPosition) UnmarshalJSON(data []byte) error
type LendPositionListHistoricalParams ¶
type LendPositionListHistoricalParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for querying lend positions by venues and assets
OfHistoricalLendPositionsByVenuesAssetsRequest *LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for querying lend positions by IDs
OfHistoricalLendPositionsByIDsRequest *LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest `json:",inline"`
// contains filtered or unexported fields
}
func (LendPositionListHistoricalParams) MarshalJSON ¶
func (u LendPositionListHistoricalParams) MarshalJSON() ([]byte, error)
func (*LendPositionListHistoricalParams) UnmarshalJSON ¶
func (r *LendPositionListHistoricalParams) UnmarshalJSON(data []byte) error
type LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest ¶
type LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// A list of lend/borrow market IDs
MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying lend positions by IDs
The properties Accounts, Blockchain, From, MarketIDs, To are required.
func (LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest) MarshalJSON ¶
func (r LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest) MarshalJSON() (data []byte, err error)
func (*LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest) UnmarshalJSON ¶
func (r *LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest) UnmarshalJSON(data []byte) error
type LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest ¶
type LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// Either a ISO8601 timestamp or a block number
From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
// Either a ISO8601 timestamp or a block number
To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying lend positions by venues and assets
The properties Accounts, Assets, Blockchain, From, To, Venues are required.
func (LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest) MarshalJSON ¶
func (r LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest) MarshalJSON() (data []byte, err error)
func (*LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest) UnmarshalJSON ¶
func (r *LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest) UnmarshalJSON(data []byte) error
type LendPositionListHistoricalResponse ¶
type LendPositionListHistoricalResponse struct {
// A range of blockstamps
Historical OnChainHistoricalRange `json:"historical,required"`
Items []LendPositionListHistoricalResponseItem `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Historical respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LendPositionListHistoricalResponse) RawJSON ¶
func (r LendPositionListHistoricalResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LendPositionListHistoricalResponse) UnmarshalJSON ¶
func (r *LendPositionListHistoricalResponse) UnmarshalJSON(data []byte) error
type LendPositionListHistoricalResponseItem ¶
type LendPositionListHistoricalResponseItem struct {
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// A list of lend positions
Items []LendPosition `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockstamp respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LendPositionListHistoricalResponseItem) RawJSON ¶
func (r LendPositionListHistoricalResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*LendPositionListHistoricalResponseItem) UnmarshalJSON ¶
func (r *LendPositionListHistoricalResponseItem) UnmarshalJSON(data []byte) error
type LendPositionListParams ¶
type LendPositionListParams struct {
// This field is a request body variant, only one variant field can be set.
// Parameters for querying lend positions by venues and assets
OfLendPositionsByVenuesAssetsRequestInput *LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Parameters for querying lend positions by IDs
OfLendPositionsByIDsRequestInput *LendPositionListParamsBodyLendPositionsByIDsRequestInput `json:",inline"`
// contains filtered or unexported fields
}
func (LendPositionListParams) MarshalJSON ¶
func (u LendPositionListParams) MarshalJSON() ([]byte, error)
func (*LendPositionListParams) UnmarshalJSON ¶
func (r *LendPositionListParams) UnmarshalJSON(data []byte) error
type LendPositionListParamsBodyLendPositionsByIDsRequestInput ¶
type LendPositionListParamsBodyLendPositionsByIDsRequestInput struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of lend/borrow market IDs
MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying lend positions by IDs
The properties Accounts, Blockchain, MarketIDs are required.
func (LendPositionListParamsBodyLendPositionsByIDsRequestInput) MarshalJSON ¶
func (r LendPositionListParamsBodyLendPositionsByIDsRequestInput) MarshalJSON() (data []byte, err error)
func (*LendPositionListParamsBodyLendPositionsByIDsRequestInput) UnmarshalJSON ¶
func (r *LendPositionListParamsBodyLendPositionsByIDsRequestInput) UnmarshalJSON(data []byte) error
type LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion ¶
type LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion) MarshalJSON ¶
func (u LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion) UnmarshalJSON ¶
func (u *LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion) UnmarshalJSON(data []byte) error
type LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput ¶
type LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// Either a ISO8601 timestamp or a block number
At LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion `json:"at,omitzero"`
// contains filtered or unexported fields
}
Parameters for querying lend positions by venues and assets
The properties Accounts, Assets, Blockchain, Venues are required.
func (LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput) MarshalJSON ¶
func (r LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput) MarshalJSON() (data []byte, err error)
func (*LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput) UnmarshalJSON ¶
func (r *LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput) UnmarshalJSON(data []byte) error
type LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion ¶
type LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion) MarshalJSON ¶
func (u LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion) MarshalJSON() ([]byte, error)
func (*LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON ¶
func (u *LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON(data []byte) error
type LendPositionListResponse ¶
type LendPositionListResponse struct {
// A list of lend positions
Items []LendPosition `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LendPositionListResponse) RawJSON ¶
func (r LendPositionListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LendPositionListResponse) UnmarshalJSON ¶
func (r *LendPositionListResponse) UnmarshalJSON(data []byte) error
type LendPositionService ¶
type LendPositionService struct {
Options []option.RequestOption
}
LendPositionService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendPositionService method instead.
func NewLendPositionService ¶
func NewLendPositionService(opts ...option.RequestOption) (r LendPositionService)
NewLendPositionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LendPositionService) List ¶
func (r *LendPositionService) List(ctx context.Context, body LendPositionListParams, opts ...option.RequestOption) (res *LendPositionListResponse, err error)
Get info on lending positions
func (*LendPositionService) ListHistorical ¶
func (r *LendPositionService) ListHistorical(ctx context.Context, body LendPositionListHistoricalParams, opts ...option.RequestOption) (res *LendPositionListHistoricalResponse, err error)
Get info on lending positions
type LendService ¶
type LendService struct {
Options []option.RequestOption
Markets LendMarketService
Positions LendPositionService
Lend LendLendService
Withdraw LendWithdrawService
SetCollateral LendSetCollateralService
}
LendService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendService method instead.
func NewLendService ¶
func NewLendService(opts ...option.RequestOption) (r LendService)
NewLendService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type LendSetCollateralNewParams ¶
type LendSetCollateralNewParams struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
MarketID LendBorrowMarketID `json:"market_id,required"`
Status bool `json:"status,required"`
// contains filtered or unexported fields
}
func (LendSetCollateralNewParams) MarshalJSON ¶
func (r LendSetCollateralNewParams) MarshalJSON() (data []byte, err error)
func (*LendSetCollateralNewParams) UnmarshalJSON ¶
func (r *LendSetCollateralNewParams) UnmarshalJSON(data []byte) error
type LendSetCollateralService ¶
type LendSetCollateralService struct {
Options []option.RequestOption
}
LendSetCollateralService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendSetCollateralService method instead.
func NewLendSetCollateralService ¶
func NewLendSetCollateralService(opts ...option.RequestOption) (r LendSetCollateralService)
NewLendSetCollateralService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LendSetCollateralService) New ¶
func (r *LendSetCollateralService) New(ctx context.Context, body LendSetCollateralNewParams, opts ...option.RequestOption) (res *Execution, err error)
Enable/disable a specific lending position to be used as collateral
type LendWithdrawNewParams ¶
type LendWithdrawNewParams struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
MarketID LendBorrowMarketID `json:"market_id,required"`
// An arbitrary precision decimal represented as a string
Amount param.Opt[string] `json:"amount,omitzero"`
// An asset ID, represented as a TypeID with `asset` prefix
Asset param.Opt[AssetID] `json:"asset,omitzero"`
// contains filtered or unexported fields
}
func (LendWithdrawNewParams) MarshalJSON ¶
func (r LendWithdrawNewParams) MarshalJSON() (data []byte, err error)
func (*LendWithdrawNewParams) UnmarshalJSON ¶
func (r *LendWithdrawNewParams) UnmarshalJSON(data []byte) error
type LendWithdrawService ¶
type LendWithdrawService struct {
Options []option.RequestOption
}
LendWithdrawService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendWithdrawService method instead.
func NewLendWithdrawService ¶
func NewLendWithdrawService(opts ...option.RequestOption) (r LendWithdrawService)
NewLendWithdrawService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LendWithdrawService) New ¶
func (r *LendWithdrawService) New(ctx context.Context, body LendWithdrawNewParams, opts ...option.RequestOption) (res *Execution, err error)
Withdraw an asset
type LockMarket ¶
type LockMarket struct {
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Asset respjson.Field
Blockchain respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A lock market
func (LockMarket) RawJSON ¶
func (r LockMarket) RawJSON() string
Returns the unmodified JSON received from the API
func (*LockMarket) UnmarshalJSON ¶
func (r *LockMarket) UnmarshalJSON(data []byte) error
type LockMarketListParams ¶
type LockMarketListParams struct {
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// contains filtered or unexported fields
}
func (LockMarketListParams) MarshalJSON ¶
func (r LockMarketListParams) MarshalJSON() (data []byte, err error)
func (*LockMarketListParams) UnmarshalJSON ¶
func (r *LockMarketListParams) UnmarshalJSON(data []byte) error
type LockMarketListResponse ¶
type LockMarketListResponse struct {
// A list of lock markets
Items []LockMarket `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LockMarketListResponse) RawJSON ¶
func (r LockMarketListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LockMarketListResponse) UnmarshalJSON ¶
func (r *LockMarketListResponse) UnmarshalJSON(data []byte) error
type LockMarketService ¶
type LockMarketService struct {
Options []option.RequestOption
}
LockMarketService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLockMarketService method instead.
func NewLockMarketService ¶
func NewLockMarketService(opts ...option.RequestOption) (r LockMarketService)
NewLockMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LockMarketService) List ¶
func (r *LockMarketService) List(ctx context.Context, body LockMarketListParams, opts ...option.RequestOption) (res *LockMarketListResponse, err error)
Get a list of markets where assets can be locked
type LockPosition ¶
type LockPosition struct {
// An EVM address
Account Account `json:"account,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// An arbitrary precision decimal represented as a string
LockedAmount Decimal `json:"locked_amount,required"`
// A NFT
LockedAsset NFT `json:"locked_asset,required"`
// A lock market
Market LockMarket `json:"market,required"`
// ISO8601 Timestamp
UnlockedAt Timestamp `json:"unlocked_at,required"`
Used bool `json:"used,required"`
// An arbitrary precision decimal represented as a string
VotingPower Decimal `json:"voting_power,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Blockstamp respjson.Field
LockedAmount respjson.Field
LockedAsset respjson.Field
Market respjson.Field
UnlockedAt respjson.Field
Used respjson.Field
VotingPower respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A lock position
func (LockPosition) RawJSON ¶
func (r LockPosition) RawJSON() string
Returns the unmodified JSON received from the API
func (*LockPosition) UnmarshalJSON ¶
func (r *LockPosition) UnmarshalJSON(data []byte) error
type LockPositionListParams ¶
type LockPositionListParams struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// contains filtered or unexported fields
}
func (LockPositionListParams) MarshalJSON ¶
func (r LockPositionListParams) MarshalJSON() (data []byte, err error)
func (*LockPositionListParams) UnmarshalJSON ¶
func (r *LockPositionListParams) UnmarshalJSON(data []byte) error
type LockPositionListResponse ¶
type LockPositionListResponse struct {
// A list of lock positions
Items []LockPosition `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LockPositionListResponse) RawJSON ¶
func (r LockPositionListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LockPositionListResponse) UnmarshalJSON ¶
func (r *LockPositionListResponse) UnmarshalJSON(data []byte) error
type LockPositionService ¶
type LockPositionService struct {
Options []option.RequestOption
}
LockPositionService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLockPositionService method instead.
func NewLockPositionService ¶
func NewLockPositionService(opts ...option.RequestOption) (r LockPositionService)
NewLockPositionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LockPositionService) List ¶
func (r *LockPositionService) List(ctx context.Context, body LockPositionListParams, opts ...option.RequestOption) (res *LockPositionListResponse, err error)
Get info on locked positions
type LockService ¶
type LockService struct {
Options []option.RequestOption
Markets LockMarketService
Positions LockPositionService
}
LockService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLockService method instead.
func NewLockService ¶
func NewLockService(opts ...option.RequestOption) (r LockService)
NewLockService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type MoveNewParams ¶
type MoveNewParams struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// An asset ID, represented as a TypeID with `asset` prefix
Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// An EVM address
To Account `json:"to,required"`
// contains filtered or unexported fields
}
func (MoveNewParams) MarshalJSON ¶
func (r MoveNewParams) MarshalJSON() (data []byte, err error)
func (*MoveNewParams) UnmarshalJSON ¶
func (r *MoveNewParams) UnmarshalJSON(data []byte) error
type MoveService ¶
type MoveService struct {
Options []option.RequestOption
}
MoveService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMoveService method instead.
func NewMoveService ¶
func NewMoveService(opts ...option.RequestOption) (r MoveService)
NewMoveService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*MoveService) New ¶
func (r *MoveService) New(ctx context.Context, body MoveNewParams, opts ...option.RequestOption) (res *Execution, err error)
Move balance from one address to another
type NFT ¶
type NFT struct {
// The NFT id
ID int64 `json:"id,required"`
// A NFT Collection
Collection NFTCollection `json:"collection,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Collection respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A NFT
func (NFT) ToParam ¶
ToParam converts this NFT to a NFTParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with NFTParam.Overrides()
func (*NFT) UnmarshalJSON ¶
type NFTCollection ¶
type NFTCollection struct {
// The NFT Collection's address
Address string `json:"address,required"`
// Data about a blockchain
Blockchain NFTCollectionBlockchain `json:"blockchain"`
// The NFT Collection's name
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
Blockchain respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A NFT Collection
func (NFTCollection) RawJSON ¶
func (r NFTCollection) RawJSON() string
Returns the unmodified JSON received from the API
func (NFTCollection) ToParam ¶
func (r NFTCollection) ToParam() NFTCollectionParam
ToParam converts this NFTCollection to a NFTCollectionParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with NFTCollectionParam.Overrides()
func (*NFTCollection) UnmarshalJSON ¶
func (r *NFTCollection) UnmarshalJSON(data []byte) error
type NFTCollectionBlockchain ¶
type NFTCollectionBlockchain struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
ID BlockchainID `json:"id,required"`
// Data about an EVM blockchain
ChainData EVMChainData `json:"chain_data,required"`
// Blockchain ecosystem
//
// Any of "evm".
ChainType ChainType `json:"chain_type,required"`
// The blockchain's explorer URL
ExplorerURL string `json:"explorer_url,required"`
// BlockchainName
Name BlockchainName `json:"name,required"`
// Blockchain's network
Network NetworkName `json:"network,required"`
// A blockchain symbol
Symbol BlockchainSymbol `json:"symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ChainData respjson.Field
ChainType respjson.Field
ExplorerURL respjson.Field
Name respjson.Field
Network respjson.Field
Symbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data about a blockchain
func (NFTCollectionBlockchain) RawJSON ¶
func (r NFTCollectionBlockchain) RawJSON() string
Returns the unmodified JSON received from the API
func (*NFTCollectionBlockchain) UnmarshalJSON ¶
func (r *NFTCollectionBlockchain) UnmarshalJSON(data []byte) error
type NFTCollectionBlockchainParam ¶
type NFTCollectionBlockchainParam struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
ID BlockchainID `json:"id,required"`
// Data about an EVM blockchain
ChainData EVMChainDataParam `json:"chain_data,omitzero,required"`
// Blockchain ecosystem
//
// Any of "evm".
ChainType ChainType `json:"chain_type,omitzero,required"`
// The blockchain's explorer URL
ExplorerURL string `json:"explorer_url,required"`
// BlockchainName
Name BlockchainName `json:"name,required"`
// Blockchain's network
Network NetworkName `json:"network,required"`
// A blockchain symbol
Symbol BlockchainSymbol `json:"symbol,required"`
// contains filtered or unexported fields
}
Data about a blockchain
The properties ID, ChainData, ChainType, ExplorerURL, Name, Network, Symbol are required.
func (NFTCollectionBlockchainParam) MarshalJSON ¶
func (r NFTCollectionBlockchainParam) MarshalJSON() (data []byte, err error)
func (*NFTCollectionBlockchainParam) UnmarshalJSON ¶
func (r *NFTCollectionBlockchainParam) UnmarshalJSON(data []byte) error
type NFTCollectionParam ¶
type NFTCollectionParam struct {
// The NFT Collection's address
Address string `json:"address,required"`
// The NFT Collection's name
Name param.Opt[string] `json:"name,omitzero"`
// Data about a blockchain
Blockchain NFTCollectionBlockchainParam `json:"blockchain,omitzero"`
// contains filtered or unexported fields
}
A NFT Collection
The property Address is required.
func (NFTCollectionParam) MarshalJSON ¶
func (r NFTCollectionParam) MarshalJSON() (data []byte, err error)
func (*NFTCollectionParam) UnmarshalJSON ¶
func (r *NFTCollectionParam) UnmarshalJSON(data []byte) error
type NFTParam ¶
type NFTParam struct {
// The NFT id
ID int64 `json:"id,required"`
// A NFT Collection
Collection NFTCollectionParam `json:"collection,omitzero,required"`
// contains filtered or unexported fields
}
A NFT
The properties ID, Collection are required.
func (NFTParam) MarshalJSON ¶
func (*NFTParam) UnmarshalJSON ¶
type NetworkName ¶
type NetworkName = string
type OffChainHistoricalRange ¶
type OffChainHistoricalRange struct {
// ISO8601 Timestamp
From Timestamp `json:"from,required"`
// ISO8601 Timestamp
To Timestamp `json:"to,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
From respjson.Field
To respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A range of timestamps
func (OffChainHistoricalRange) RawJSON ¶
func (r OffChainHistoricalRange) RawJSON() string
Returns the unmodified JSON received from the API
func (*OffChainHistoricalRange) UnmarshalJSON ¶
func (r *OffChainHistoricalRange) UnmarshalJSON(data []byte) error
type OnChainHistoricalRange ¶
type OnChainHistoricalRange struct {
// Information about a specific block number and its timestamp
From Blockstamp `json:"from,required"`
// Information about a specific block number and its timestamp
To Blockstamp `json:"to,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
From respjson.Field
To respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A range of blockstamps
func (OnChainHistoricalRange) RawJSON ¶
func (r OnChainHistoricalRange) RawJSON() string
Returns the unmodified JSON received from the API
func (*OnChainHistoricalRange) UnmarshalJSON ¶
func (r *OnChainHistoricalRange) UnmarshalJSON(data []byte) error
type Price ¶
type Price struct {
// An asset symbol
AssetSymbol AssetSymbol `json:"asset_symbol,required"`
// An arbitrary precision decimal represented as a string
Change1h string `json:"change_1h,required"`
// An arbitrary precision decimal represented as a string
Change1y string `json:"change_1y,required"`
// An arbitrary precision decimal represented as a string
Change24h string `json:"change_24h,required"`
// An arbitrary precision decimal represented as a string
Change30d string `json:"change_30d,required"`
// An arbitrary precision decimal represented as a string
Change7d string `json:"change_7d,required"`
// An arbitrary precision decimal represented as a string
MarketCap string `json:"market_cap,required"`
// An arbitrary precision decimal represented as a string
Price Decimal `json:"price,required"`
// An asset symbol
QuoteAssetSymbol AssetSymbol `json:"quote_asset_symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AssetSymbol respjson.Field
Change1h respjson.Field
Change1y respjson.Field
Change24h respjson.Field
Change30d respjson.Field
Change7d respjson.Field
MarketCap respjson.Field
Price respjson.Field
QuoteAssetSymbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A price
func (*Price) UnmarshalJSON ¶
type PriceListHistoricalParams ¶
type PriceListHistoricalParams struct {
// A list of asset symbols
AssetSymbols []AssetSymbol `json:"asset_symbols,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[AssetSymbol] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
func (PriceListHistoricalParams) MarshalJSON ¶
func (r PriceListHistoricalParams) MarshalJSON() (data []byte, err error)
func (*PriceListHistoricalParams) UnmarshalJSON ¶
func (r *PriceListHistoricalParams) UnmarshalJSON(data []byte) error
type PriceListHistoricalResponse ¶
type PriceListHistoricalResponse struct {
// A range of timestamps
Historical OffChainHistoricalRange `json:"historical,required"`
Items []PriceListHistoricalResponseItem `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Historical respjson.Field
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PriceListHistoricalResponse) RawJSON ¶
func (r PriceListHistoricalResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PriceListHistoricalResponse) UnmarshalJSON ¶
func (r *PriceListHistoricalResponse) UnmarshalJSON(data []byte) error
type PriceListHistoricalResponseItem ¶
type PriceListHistoricalResponseItem struct {
// Array of price
Items []Price `json:"items,required"`
// ISO8601 Timestamp
Timestamp Timestamp `json:"timestamp,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Timestamp respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PriceListHistoricalResponseItem) RawJSON ¶
func (r PriceListHistoricalResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*PriceListHistoricalResponseItem) UnmarshalJSON ¶
func (r *PriceListHistoricalResponseItem) UnmarshalJSON(data []byte) error
type PriceListParams ¶
type PriceListParams struct {
// A list of asset symbols
AssetSymbols []AssetSymbol `json:"asset_symbols,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[AssetSymbol] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
func (PriceListParams) MarshalJSON ¶
func (r PriceListParams) MarshalJSON() (data []byte, err error)
func (*PriceListParams) UnmarshalJSON ¶
func (r *PriceListParams) UnmarshalJSON(data []byte) error
type PriceListResponse ¶
type PriceListResponse struct {
// Array of price
Items []Price `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PriceListResponse) RawJSON ¶
func (r PriceListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PriceListResponse) UnmarshalJSON ¶
func (r *PriceListResponse) UnmarshalJSON(data []byte) error
type PriceService ¶
type PriceService struct {
Options []option.RequestOption
}
PriceService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPriceService method instead.
func NewPriceService ¶
func NewPriceService(opts ...option.RequestOption) (r PriceService)
NewPriceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PriceService) List ¶
func (r *PriceService) List(ctx context.Context, body PriceListParams, opts ...option.RequestOption) (res *PriceListResponse, err error)
Get a list of asset prices
func (*PriceService) ListHistorical ¶
func (r *PriceService) ListHistorical(ctx context.Context, body PriceListHistoricalParams, opts ...option.RequestOption) (res *PriceListHistoricalResponse, err error)
Get a list of asset prices
type QuoteInfo0x ¶
type QuoteInfo0x struct {
// An arbitrary precision decimal represented as a string
EstimatedGasUsed string `json:"estimated_gas_used,required"`
// A route in a 0x quote
Route QuoteInfo0xRoute `json:"route,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EstimatedGasUsed respjson.Field
Route respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Quote info for 0x
func (QuoteInfo0x) RawJSON ¶
func (r QuoteInfo0x) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuoteInfo0x) UnmarshalJSON ¶
func (r *QuoteInfo0x) UnmarshalJSON(data []byte) error
type QuoteInfo0xFill ¶
type QuoteInfo0xFill struct {
// An EVM address
From AddressEVM `json:"from,required"`
ProportionBps int64 `json:"proportion_bps,required"`
Source string `json:"source,required"`
// An EVM address
To AddressEVM `json:"to,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
From respjson.Field
ProportionBps respjson.Field
Source respjson.Field
To respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A fill in a 0x quote
func (QuoteInfo0xFill) RawJSON ¶
func (r QuoteInfo0xFill) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuoteInfo0xFill) UnmarshalJSON ¶
func (r *QuoteInfo0xFill) UnmarshalJSON(data []byte) error
type QuoteInfo0xRoute ¶
type QuoteInfo0xRoute struct {
// A list of fills in a 0x quote
Fills []QuoteInfo0xFill `json:"fills,required"`
// A list of tokens in a 0x quote
Tokens []QuoteInfo0xToken `json:"tokens,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Fills respjson.Field
Tokens respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A route in a 0x quote
func (QuoteInfo0xRoute) RawJSON ¶
func (r QuoteInfo0xRoute) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuoteInfo0xRoute) UnmarshalJSON ¶
func (r *QuoteInfo0xRoute) UnmarshalJSON(data []byte) error
type QuoteInfo0xToken ¶
type QuoteInfo0xToken struct {
// An EVM address
Address AddressEVM `json:"address,required"`
Symbol string `json:"symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
Symbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A token in a 0x quote
func (QuoteInfo0xToken) RawJSON ¶
func (r QuoteInfo0xToken) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuoteInfo0xToken) UnmarshalJSON ¶
func (r *QuoteInfo0xToken) UnmarshalJSON(data []byte) error
type QuoteInfoCurve ¶
type QuoteInfoCurve struct {
IIndex int64 `json:"i_index,required"`
JIndex int64 `json:"j_index,required"`
// A LP pool ID, represented as a TypeID with `lp_pool` prefix
PoolID string `json:"pool_id,required"`
SwapType string `json:"swap_type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IIndex respjson.Field
JIndex respjson.Field
PoolID respjson.Field
SwapType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Quote info for Curve
func (QuoteInfoCurve) RawJSON ¶
func (r QuoteInfoCurve) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuoteInfoCurve) UnmarshalJSON ¶
func (r *QuoteInfoCurve) UnmarshalJSON(data []byte) error
type QuoteInfoUniswapV2 ¶
type QuoteInfoUniswapV2 struct {
// A list of LP pool IDs
PoolIDs []string `json:"pool_ids,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PoolIDs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Quote info for Uniswap V2
func (QuoteInfoUniswapV2) RawJSON ¶
func (r QuoteInfoUniswapV2) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuoteInfoUniswapV2) UnmarshalJSON ¶
func (r *QuoteInfoUniswapV2) UnmarshalJSON(data []byte) error
type QuoteInfoUniswapV3 ¶
type QuoteInfoUniswapV3 struct {
// A list of LP pool IDs
PoolIDs []string `json:"pool_ids,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PoolIDs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Quote info for Uniswap V3
func (QuoteInfoUniswapV3) RawJSON ¶
func (r QuoteInfoUniswapV3) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuoteInfoUniswapV3) UnmarshalJSON ¶
func (r *QuoteInfoUniswapV3) UnmarshalJSON(data []byte) error
type RegionName ¶
type RegionName = shared.RegionName
Region the resource is in.
This is an alias to an internal type.
type RegistryAssetListParams ¶
type RegistryAssetListParams struct {
// An asset ID, represented as a TypeID with `asset` prefix
ID param.Opt[string] `json:"id,omitzero"`
// An asset symbol
Symbol param.Opt[string] `json:"symbol,omitzero"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain param.Opt[BlockchainID] `json:"blockchain,omitzero"`
// contains filtered or unexported fields
}
func (RegistryAssetListParams) MarshalJSON ¶
func (r RegistryAssetListParams) MarshalJSON() (data []byte, err error)
func (*RegistryAssetListParams) UnmarshalJSON ¶
func (r *RegistryAssetListParams) UnmarshalJSON(data []byte) error
type RegistryAssetListResponse ¶
type RegistryAssetListResponse struct {
// Response for multiple assets
Items []Asset `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryAssetListResponse) RawJSON ¶
func (r RegistryAssetListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryAssetListResponse) UnmarshalJSON ¶
func (r *RegistryAssetListResponse) UnmarshalJSON(data []byte) error
type RegistryAssetService ¶
type RegistryAssetService struct {
Options []option.RequestOption
}
RegistryAssetService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryAssetService method instead.
func NewRegistryAssetService ¶
func NewRegistryAssetService(opts ...option.RequestOption) (r RegistryAssetService)
NewRegistryAssetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryAssetService) List ¶
func (r *RegistryAssetService) List(ctx context.Context, body RegistryAssetListParams, opts ...option.RequestOption) (res *RegistryAssetListResponse, err error)
List supported assets, optionally filtered by blockchain
type RegistryBlockchainListParams ¶
type RegistryBlockchainListParams struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
ID param.Opt[string] `json:"id,omitzero"`
// A blockchain symbol
Symbol param.Opt[string] `json:"symbol,omitzero"`
// contains filtered or unexported fields
}
func (RegistryBlockchainListParams) MarshalJSON ¶
func (r RegistryBlockchainListParams) MarshalJSON() (data []byte, err error)
func (*RegistryBlockchainListParams) UnmarshalJSON ¶
func (r *RegistryBlockchainListParams) UnmarshalJSON(data []byte) error
type RegistryBlockchainListResponse ¶
type RegistryBlockchainListResponse struct {
// A list of blockchains
Items []Blockchain `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryBlockchainListResponse) RawJSON ¶
func (r RegistryBlockchainListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryBlockchainListResponse) UnmarshalJSON ¶
func (r *RegistryBlockchainListResponse) UnmarshalJSON(data []byte) error
type RegistryBlockchainService ¶
type RegistryBlockchainService struct {
Options []option.RequestOption
}
RegistryBlockchainService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryBlockchainService method instead.
func NewRegistryBlockchainService ¶
func NewRegistryBlockchainService(opts ...option.RequestOption) (r RegistryBlockchainService)
NewRegistryBlockchainService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryBlockchainService) List ¶
func (r *RegistryBlockchainService) List(ctx context.Context, body RegistryBlockchainListParams, opts ...option.RequestOption) (res *RegistryBlockchainListResponse, err error)
List supported blockchains
type RegistryBorrowMarketListParams ¶
type RegistryBorrowMarketListParams struct {
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
ID param.Opt[string] `json:"id,omitzero"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain param.Opt[BlockchainID] `json:"blockchain,omitzero"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero"`
// contains filtered or unexported fields
}
func (RegistryBorrowMarketListParams) MarshalJSON ¶
func (r RegistryBorrowMarketListParams) MarshalJSON() (data []byte, err error)
func (*RegistryBorrowMarketListParams) UnmarshalJSON ¶
func (r *RegistryBorrowMarketListParams) UnmarshalJSON(data []byte) error
type RegistryBorrowMarketListResponse ¶
type RegistryBorrowMarketListResponse struct {
// A list of registry data for lend borrow markets
Items []RegistryLendBorrowMarket `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryBorrowMarketListResponse) RawJSON ¶
func (r RegistryBorrowMarketListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryBorrowMarketListResponse) UnmarshalJSON ¶
func (r *RegistryBorrowMarketListResponse) UnmarshalJSON(data []byte) error
type RegistryBorrowMarketService ¶
type RegistryBorrowMarketService struct {
Options []option.RequestOption
}
RegistryBorrowMarketService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryBorrowMarketService method instead.
func NewRegistryBorrowMarketService ¶
func NewRegistryBorrowMarketService(opts ...option.RequestOption) (r RegistryBorrowMarketService)
NewRegistryBorrowMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryBorrowMarketService) List ¶
func (r *RegistryBorrowMarketService) List(ctx context.Context, body RegistryBorrowMarketListParams, opts ...option.RequestOption) (res *RegistryBorrowMarketListResponse, err error)
List borrow markets in the registry, optionally filtered by blockchain, assets or venues
type RegistryErrorListParams ¶
type RegistryErrorListParams struct {
Errors []string `json:"errors,omitzero"`
// contains filtered or unexported fields
}
func (RegistryErrorListParams) MarshalJSON ¶
func (r RegistryErrorListParams) MarshalJSON() (data []byte, err error)
func (*RegistryErrorListParams) UnmarshalJSON ¶
func (r *RegistryErrorListParams) UnmarshalJSON(data []byte) error
type RegistryErrorListResponse ¶
type RegistryErrorListResponse struct {
// A list of errors
Items []VektorError `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryErrorListResponse) RawJSON ¶
func (r RegistryErrorListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryErrorListResponse) UnmarshalJSON ¶
func (r *RegistryErrorListResponse) UnmarshalJSON(data []byte) error
type RegistryErrorService ¶
type RegistryErrorService struct {
Options []option.RequestOption
}
RegistryErrorService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryErrorService method instead.
func NewRegistryErrorService ¶
func NewRegistryErrorService(opts ...option.RequestOption) (r RegistryErrorService)
NewRegistryErrorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryErrorService) List ¶
func (r *RegistryErrorService) List(ctx context.Context, body RegistryErrorListParams, opts ...option.RequestOption) (res *RegistryErrorListResponse, err error)
A list with one example of each error type
type RegistryLPPool ¶
type RegistryLPPool struct {
// A LP pool ID, represented as a TypeID with `lp_pool` prefix
ID string `json:"id,required"`
// Response for multiple assets
Assets []Asset `json:"assets,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Assets respjson.Field
Blockchain respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Registry data for an LP pool
func (RegistryLPPool) RawJSON ¶
func (r RegistryLPPool) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryLPPool) UnmarshalJSON ¶
func (r *RegistryLPPool) UnmarshalJSON(data []byte) error
type RegistryLPPoolListParams ¶
type RegistryLPPoolListParams struct {
// A LP pool ID, represented as a TypeID with `lp_pool` prefix
ID param.Opt[string] `json:"id,omitzero"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain param.Opt[BlockchainID] `json:"blockchain,omitzero"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero"`
// contains filtered or unexported fields
}
func (RegistryLPPoolListParams) MarshalJSON ¶
func (r RegistryLPPoolListParams) MarshalJSON() (data []byte, err error)
func (*RegistryLPPoolListParams) UnmarshalJSON ¶
func (r *RegistryLPPoolListParams) UnmarshalJSON(data []byte) error
type RegistryLPPoolListResponse ¶
type RegistryLPPoolListResponse struct {
// A list of registry data for LP pools
Items []RegistryLPPool `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryLPPoolListResponse) RawJSON ¶
func (r RegistryLPPoolListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryLPPoolListResponse) UnmarshalJSON ¶
func (r *RegistryLPPoolListResponse) UnmarshalJSON(data []byte) error
type RegistryLPPoolService ¶
type RegistryLPPoolService struct {
Options []option.RequestOption
}
RegistryLPPoolService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryLPPoolService method instead.
func NewRegistryLPPoolService ¶
func NewRegistryLPPoolService(opts ...option.RequestOption) (r RegistryLPPoolService)
NewRegistryLPPoolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryLPPoolService) List ¶
func (r *RegistryLPPoolService) List(ctx context.Context, body RegistryLPPoolListParams, opts ...option.RequestOption) (res *RegistryLPPoolListResponse, err error)
List LP pools in the registry, optionally filtered by blockchain, assets or venues
type RegistryLendBorrowMarket ¶
type RegistryLendBorrowMarket struct {
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
ID LendBorrowMarketID `json:"id,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Asset respjson.Field
Blockchain respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Registry data for a lend borrow market
func (RegistryLendBorrowMarket) RawJSON ¶
func (r RegistryLendBorrowMarket) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryLendBorrowMarket) UnmarshalJSON ¶
func (r *RegistryLendBorrowMarket) UnmarshalJSON(data []byte) error
type RegistryLendMarketListParams ¶
type RegistryLendMarketListParams struct {
// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
// prefix
ID param.Opt[string] `json:"id,omitzero"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain param.Opt[BlockchainID] `json:"blockchain,omitzero"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero"`
// contains filtered or unexported fields
}
func (RegistryLendMarketListParams) MarshalJSON ¶
func (r RegistryLendMarketListParams) MarshalJSON() (data []byte, err error)
func (*RegistryLendMarketListParams) UnmarshalJSON ¶
func (r *RegistryLendMarketListParams) UnmarshalJSON(data []byte) error
type RegistryLendMarketListResponse ¶
type RegistryLendMarketListResponse struct {
// A list of registry data for lend borrow markets
Items []RegistryLendBorrowMarket `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryLendMarketListResponse) RawJSON ¶
func (r RegistryLendMarketListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryLendMarketListResponse) UnmarshalJSON ¶
func (r *RegistryLendMarketListResponse) UnmarshalJSON(data []byte) error
type RegistryLendMarketService ¶
type RegistryLendMarketService struct {
Options []option.RequestOption
}
RegistryLendMarketService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryLendMarketService method instead.
func NewRegistryLendMarketService ¶
func NewRegistryLendMarketService(opts ...option.RequestOption) (r RegistryLendMarketService)
NewRegistryLendMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryLendMarketService) List ¶
func (r *RegistryLendMarketService) List(ctx context.Context, body RegistryLendMarketListParams, opts ...option.RequestOption) (res *RegistryLendMarketListResponse, err error)
List lend markets in the registry, optionally filtered by blockchain, assets or venues
type RegistryService ¶
type RegistryService struct {
Options []option.RequestOption
Assets RegistryAssetService
Blockchains RegistryBlockchainService
Venues RegistryVenueService
Errors RegistryErrorService
LendMarkets RegistryLendMarketService
BorrowMarkets RegistryBorrowMarketService
LPPools RegistryLPPoolService
}
RegistryService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryService method instead.
func NewRegistryService ¶
func NewRegistryService(opts ...option.RequestOption) (r RegistryService)
NewRegistryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type RegistryVenueListParams ¶
type RegistryVenueListParams struct {
// A venue ID, represented as a TypeID with `venue` prefix
ID param.Opt[string] `json:"id,omitzero"`
// A venue symbol
Symbol param.Opt[string] `json:"symbol,omitzero"`
// contains filtered or unexported fields
}
func (RegistryVenueListParams) MarshalJSON ¶
func (r RegistryVenueListParams) MarshalJSON() (data []byte, err error)
func (*RegistryVenueListParams) UnmarshalJSON ¶
func (r *RegistryVenueListParams) UnmarshalJSON(data []byte) error
type RegistryVenueListResponse ¶
type RegistryVenueListResponse struct {
// A list of venues
Items []Venue `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryVenueListResponse) RawJSON ¶
func (r RegistryVenueListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryVenueListResponse) UnmarshalJSON ¶
func (r *RegistryVenueListResponse) UnmarshalJSON(data []byte) error
type RegistryVenueService ¶
type RegistryVenueService struct {
Options []option.RequestOption
}
RegistryVenueService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryVenueService method instead.
func NewRegistryVenueService ¶
func NewRegistryVenueService(opts ...option.RequestOption) (r RegistryVenueService)
NewRegistryVenueService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryVenueService) List ¶
func (r *RegistryVenueService) List(ctx context.Context, body RegistryVenueListParams, opts ...option.RequestOption) (res *RegistryVenueListResponse, err error)
List supported venues
type ResourceStatus ¶
type ResourceStatus = shared.ResourceStatus
Status of the resource.
This is an alias to an internal type.
type SellQuote ¶
type SellQuote struct {
// Data about a blockchain
Blockchain Blockchain `json:"blockchain,required"`
// Estimated cost of an operation
FeeEstimate SellQuoteFeeEstimate `json:"fee_estimate,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// Quote info for sell quotes
QuoteInfo SellQuoteQuoteInfoUnion `json:"quote_info,required"`
// An arbitrary precision decimal represented as a string
QuoteValue string `json:"quote_value,required"`
// An arbitrary precision decimal represented as a string
ReceiveAmount Decimal `json:"receive_amount,required"`
// On-chain asset (aka token)
ReceiveAsset Asset `json:"receive_asset,required"`
// An arbitrary precision decimal represented as a string
SpendAmount Decimal `json:"spend_amount,required"`
// On-chain asset (aka token)
SpendAsset Asset `json:"spend_asset,required"`
// On-chain venue
Venue Venue `json:"venue,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockchain respjson.Field
FeeEstimate respjson.Field
QuoteAssetSymbol respjson.Field
QuoteInfo respjson.Field
QuoteValue respjson.Field
ReceiveAmount respjson.Field
ReceiveAsset respjson.Field
SpendAmount respjson.Field
SpendAsset respjson.Field
Venue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A sell quote
func (*SellQuote) UnmarshalJSON ¶
type SellQuoteFeeEstimate ¶
type SellQuoteFeeEstimate struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// On-chain asset (aka token)
Asset Asset `json:"asset,required"`
// An arbitrary precision decimal represented as a string
Cost string `json:"cost,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
Cost respjson.Field
QuoteAssetSymbol respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Estimated cost of an operation
func (SellQuoteFeeEstimate) RawJSON ¶
func (r SellQuoteFeeEstimate) RawJSON() string
Returns the unmodified JSON received from the API
func (*SellQuoteFeeEstimate) UnmarshalJSON ¶
func (r *SellQuoteFeeEstimate) UnmarshalJSON(data []byte) error
type SellQuoteListParams ¶
type SellQuoteListParams struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An asset ID, represented as a TypeID with `asset` prefix
ReceiveAsset AssetIDOrAddressEVMOrAssetSymbol `json:"receive_asset,required"`
// An arbitrary precision decimal represented as a string
SpendAmount Decimal `json:"spend_amount,required"`
// An asset ID, represented as a TypeID with `asset` prefix
SpendAsset AssetIDOrAddressEVMOrAssetSymbol `json:"spend_asset,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
func (SellQuoteListParams) MarshalJSON ¶
func (r SellQuoteListParams) MarshalJSON() (data []byte, err error)
func (*SellQuoteListParams) UnmarshalJSON ¶
func (r *SellQuoteListParams) UnmarshalJSON(data []byte) error
type SellQuoteListResponse ¶
type SellQuoteListResponse struct {
// A list of sell quotes
Items []SellQuote `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SellQuoteListResponse) RawJSON ¶
func (r SellQuoteListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SellQuoteListResponse) UnmarshalJSON ¶
func (r *SellQuoteListResponse) UnmarshalJSON(data []byte) error
type SellQuoteQuoteInfoUnion ¶
type SellQuoteQuoteInfoUnion struct {
// This field is from variant [QuoteInfoCurve].
IIndex int64 `json:"i_index"`
// This field is from variant [QuoteInfoCurve].
JIndex int64 `json:"j_index"`
// This field is from variant [QuoteInfoCurve].
PoolID string `json:"pool_id"`
// This field is from variant [QuoteInfoCurve].
SwapType string `json:"swap_type"`
PoolIDs []string `json:"pool_ids"`
// This field is from variant [QuoteInfo0x].
EstimatedGasUsed string `json:"estimated_gas_used"`
// This field is from variant [QuoteInfo0x].
Route QuoteInfo0xRoute `json:"route"`
JSON struct {
IIndex respjson.Field
JIndex respjson.Field
PoolID respjson.Field
SwapType respjson.Field
PoolIDs respjson.Field
EstimatedGasUsed respjson.Field
Route respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
SellQuoteQuoteInfoUnion contains all possible properties and values from QuoteInfoCurve, QuoteInfoUniswapV2, QuoteInfoUniswapV3, QuoteInfo0x.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (SellQuoteQuoteInfoUnion) AsQuoteInfo0x ¶
func (u SellQuoteQuoteInfoUnion) AsQuoteInfo0x() (v QuoteInfo0x)
func (SellQuoteQuoteInfoUnion) AsQuoteInfoCurve ¶
func (u SellQuoteQuoteInfoUnion) AsQuoteInfoCurve() (v QuoteInfoCurve)
func (SellQuoteQuoteInfoUnion) AsQuoteInfoUniswapV2 ¶
func (u SellQuoteQuoteInfoUnion) AsQuoteInfoUniswapV2() (v QuoteInfoUniswapV2)
func (SellQuoteQuoteInfoUnion) AsQuoteInfoUniswapV3 ¶
func (u SellQuoteQuoteInfoUnion) AsQuoteInfoUniswapV3() (v QuoteInfoUniswapV3)
func (SellQuoteQuoteInfoUnion) RawJSON ¶
func (u SellQuoteQuoteInfoUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*SellQuoteQuoteInfoUnion) UnmarshalJSON ¶
func (r *SellQuoteQuoteInfoUnion) UnmarshalJSON(data []byte) error
type SellQuoteService ¶
type SellQuoteService struct {
Options []option.RequestOption
}
SellQuoteService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSellQuoteService method instead.
func NewSellQuoteService ¶
func NewSellQuoteService(opts ...option.RequestOption) (r SellQuoteService)
NewSellQuoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SellQuoteService) List ¶
func (r *SellQuoteService) List(ctx context.Context, body SellQuoteListParams, opts ...option.RequestOption) (res *SellQuoteListResponse, err error)
Get quotes for selling an exact amount of an asset at current market rate
type SellSellNewParams ¶
type SellSellNewParams struct {
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// An asset ID, represented as a TypeID with `asset` prefix
ReceiveAsset AssetIDOrAddressEVMOrAssetSymbol `json:"receive_asset,required"`
// An arbitrary precision decimal represented as a string
SpendAmount Decimal `json:"spend_amount,required"`
// An asset ID, represented as a TypeID with `asset` prefix
SpendAsset AssetIDOrAddressEVMOrAssetSymbol `json:"spend_asset,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An arbitrary precision decimal represented as a string
Slippage param.Opt[string] `json:"slippage,omitzero"`
// contains filtered or unexported fields
}
func (SellSellNewParams) MarshalJSON ¶
func (r SellSellNewParams) MarshalJSON() (data []byte, err error)
func (*SellSellNewParams) UnmarshalJSON ¶
func (r *SellSellNewParams) UnmarshalJSON(data []byte) error
type SellSellService ¶
type SellSellService struct {
Options []option.RequestOption
}
SellSellService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSellSellService method instead.
func NewSellSellService ¶
func NewSellSellService(opts ...option.RequestOption) (r SellSellService)
NewSellSellService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SellSellService) New ¶
func (r *SellSellService) New(ctx context.Context, body SellSellNewParams, opts ...option.RequestOption) (res *Execution, err error)
Sell an asset for another asset
type SellService ¶
type SellService struct {
Options []option.RequestOption
Quotes SellQuoteService
Sell SellSellService
}
SellService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSellService method instead.
func NewSellService ¶
func NewSellService(opts ...option.RequestOption) (r SellService)
NewSellService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type TimestampOrBlockNumberUnionParam ¶
type TimestampOrBlockNumberUnionParam struct {
OfString param.Opt[Timestamp] `json:",omitzero,inline"`
OfInt param.Opt[BlockNumber] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TimestampOrBlockNumberUnionParam) MarshalJSON ¶
func (u TimestampOrBlockNumberUnionParam) MarshalJSON() ([]byte, error)
func (*TimestampOrBlockNumberUnionParam) UnmarshalJSON ¶
func (u *TimestampOrBlockNumberUnionParam) UnmarshalJSON(data []byte) error
type VektorError ¶
type VektorError struct {
// Error message
Message string `json:"message,required"`
// Error parameters
Params map[string]any `json:"params,required"`
// Error type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Params respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An error
func (VektorError) RawJSON ¶
func (r VektorError) RawJSON() string
Returns the unmodified JSON received from the API
func (*VektorError) UnmarshalJSON ¶
func (r *VektorError) UnmarshalJSON(data []byte) error
type VektorService ¶
type VektorService struct {
Options []option.RequestOption
Registry RegistryService
Balances BalanceService
Prices PriceService
Lend LendService
Borrow BorrowService
LP LPService
Buy BuyService
Sell SellService
Move MoveService
Wrap WrapService
Bridge BridgeService
Lock LockService
Vote VoteService
Incentivize IncentivizeService
Executions ExecutionService
}
VektorService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVektorService method instead.
func NewVektorService ¶
func NewVektorService(opts ...option.RequestOption) (r VektorService)
NewVektorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type Venue ¶
type Venue struct {
// A venue ID, represented as a TypeID with `venue` prefix
ID VenueID `json:"id,required"`
// A list of blockchain IDs
BlockchainIDs []BlockchainID `json:"blockchain_ids,required"`
// Venue name
Name string `json:"name,required"`
// A venue symbol
Symbol VenueSymbol `json:"symbol,required"`
// Venue type
Type string `json:"type,required"`
// Venue url
URL string `json:"url,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
BlockchainIDs respjson.Field
Name respjson.Field
Symbol respjson.Field
Type respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
On-chain venue
func (*Venue) UnmarshalJSON ¶
type VenueIDOrVenueSymbol ¶
type VenueIDOrVenueSymbol = string
type VenueSymbol ¶
type VenueSymbol = string
type VoteMarket ¶
type VoteMarket struct {
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// A lp pool incentive market
Market IncentivizeMarket `json:"market,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// A list of arbitrary precision decimals
TradingFeesAmounts []Decimal `json:"trading_fees_amounts,required"`
// Response for multiple assets
TradingFeesAssets []Asset `json:"trading_fees_assets,required"`
// An arbitrary precision decimal represented as a string
Value Decimal `json:"value,required"`
// An arbitrary precision decimal represented as a string
ValuePerVote Decimal `json:"value_per_vote,required"`
// An arbitrary precision decimal represented as a string
Votes Decimal `json:"votes,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockstamp respjson.Field
Market respjson.Field
QuoteAssetSymbol respjson.Field
TradingFeesAmounts respjson.Field
TradingFeesAssets respjson.Field
Value respjson.Field
ValuePerVote respjson.Field
Votes respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A LP incentive vote market
func (VoteMarket) RawJSON ¶
func (r VoteMarket) RawJSON() string
Returns the unmodified JSON received from the API
func (*VoteMarket) UnmarshalJSON ¶
func (r *VoteMarket) UnmarshalJSON(data []byte) error
type VoteMarketListParams ¶
type VoteMarketListParams struct {
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
func (VoteMarketListParams) MarshalJSON ¶
func (r VoteMarketListParams) MarshalJSON() (data []byte, err error)
func (*VoteMarketListParams) UnmarshalJSON ¶
func (r *VoteMarketListParams) UnmarshalJSON(data []byte) error
type VoteMarketListResponse ¶
type VoteMarketListResponse struct {
// A list of LP incentive vote markets
Items []VoteMarket `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (VoteMarketListResponse) RawJSON ¶
func (r VoteMarketListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*VoteMarketListResponse) UnmarshalJSON ¶
func (r *VoteMarketListResponse) UnmarshalJSON(data []byte) error
type VoteMarketService ¶
type VoteMarketService struct {
Options []option.RequestOption
}
VoteMarketService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoteMarketService method instead.
func NewVoteMarketService ¶
func NewVoteMarketService(opts ...option.RequestOption) (r VoteMarketService)
NewVoteMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VoteMarketService) List ¶
func (r *VoteMarketService) List(ctx context.Context, body VoteMarketListParams, opts ...option.RequestOption) (res *VoteMarketListResponse, err error)
Get the current LP voting markets
type VoteReward ¶
type VoteReward struct {
// An EVM address
Account Account `json:"account,required"`
// Information about a specific block number and its timestamp
Blockstamp Blockstamp `json:"blockstamp,required"`
// A list of arbitrary precision decimals
FeeAmounts []Decimal `json:"fee_amounts,required"`
// Response for multiple assets
FeeAssets []Asset `json:"fee_assets,required"`
// A list of arbitrary precision decimals
IncentiveAmounts []Decimal `json:"incentive_amounts,required"`
// Response for multiple assets
IncentiveAssets []Asset `json:"incentive_assets,required"`
// A list of lock positions
LockPositions []LockPosition `json:"lock_positions,required"`
// A liquidity pool
Pool LPPool `json:"pool,required"`
// An asset symbol
QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
// An arbitrary precision decimal represented as a string
Value Decimal `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Blockstamp respjson.Field
FeeAmounts respjson.Field
FeeAssets respjson.Field
IncentiveAmounts respjson.Field
IncentiveAssets respjson.Field
LockPositions respjson.Field
Pool respjson.Field
QuoteAssetSymbol respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A LP vote reward
func (VoteReward) RawJSON ¶
func (r VoteReward) RawJSON() string
Returns the unmodified JSON received from the API
func (*VoteReward) UnmarshalJSON ¶
func (r *VoteReward) UnmarshalJSON(data []byte) error
type VoteRewardListParams ¶
type VoteRewardListParams struct {
// A list of accounts. Currently only EVM addresses are supported.
Accounts []Account `json:"accounts,omitzero,required"`
// A list of asset IDs, EVM addresses or asset symbols
Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// A list of venue IDs or venue symbols
Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
// An asset symbol
QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
// contains filtered or unexported fields
}
func (VoteRewardListParams) MarshalJSON ¶
func (r VoteRewardListParams) MarshalJSON() (data []byte, err error)
func (*VoteRewardListParams) UnmarshalJSON ¶
func (r *VoteRewardListParams) UnmarshalJSON(data []byte) error
type VoteRewardListResponse ¶
type VoteRewardListResponse struct {
// A list of LP vote rewards
Items []VoteReward `json:"items,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (VoteRewardListResponse) RawJSON ¶
func (r VoteRewardListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*VoteRewardListResponse) UnmarshalJSON ¶
func (r *VoteRewardListResponse) UnmarshalJSON(data []byte) error
type VoteRewardService ¶
type VoteRewardService struct {
Options []option.RequestOption
}
VoteRewardService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoteRewardService method instead.
func NewVoteRewardService ¶
func NewVoteRewardService(opts ...option.RequestOption) (r VoteRewardService)
NewVoteRewardService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VoteRewardService) List ¶
func (r *VoteRewardService) List(ctx context.Context, body VoteRewardListParams, opts ...option.RequestOption) (res *VoteRewardListResponse, err error)
Get the unclaimed rewards from LP voting markets
type VoteService ¶
type VoteService struct {
Options []option.RequestOption
Markets VoteMarketService
Rewards VoteRewardService
}
VoteService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoteService method instead.
func NewVoteService ¶
func NewVoteService(opts ...option.RequestOption) (r VoteService)
NewVoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type WrapService ¶
type WrapService struct {
Options []option.RequestOption
Wrap WrapWrapService
Unwrap WrapUnwrapService
}
WrapService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWrapService method instead.
func NewWrapService ¶
func NewWrapService(opts ...option.RequestOption) (r WrapService)
NewWrapService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type WrapUnwrapNewParams ¶
type WrapUnwrapNewParams struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// contains filtered or unexported fields
}
func (WrapUnwrapNewParams) MarshalJSON ¶
func (r WrapUnwrapNewParams) MarshalJSON() (data []byte, err error)
func (*WrapUnwrapNewParams) UnmarshalJSON ¶
func (r *WrapUnwrapNewParams) UnmarshalJSON(data []byte) error
type WrapUnwrapService ¶
type WrapUnwrapService struct {
Options []option.RequestOption
}
WrapUnwrapService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWrapUnwrapService method instead.
func NewWrapUnwrapService ¶
func NewWrapUnwrapService(opts ...option.RequestOption) (r WrapUnwrapService)
NewWrapUnwrapService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WrapUnwrapService) New ¶
func (r *WrapUnwrapService) New(ctx context.Context, body WrapUnwrapNewParams, opts ...option.RequestOption) (res *Execution, err error)
Unwrap the wrapped native asset
type WrapWrapNewParams ¶
type WrapWrapNewParams struct {
// An arbitrary precision decimal represented as a string
Amount Decimal `json:"amount,required"`
// A blockchain ID, represented as a TypeID with `blockchain` prefix
Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
// An EVM address
From Account `json:"from,required"`
// contains filtered or unexported fields
}
func (WrapWrapNewParams) MarshalJSON ¶
func (r WrapWrapNewParams) MarshalJSON() (data []byte, err error)
func (*WrapWrapNewParams) UnmarshalJSON ¶
func (r *WrapWrapNewParams) UnmarshalJSON(data []byte) error
type WrapWrapService ¶
type WrapWrapService struct {
Options []option.RequestOption
}
WrapWrapService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWrapWrapService method instead.
func NewWrapWrapService ¶
func NewWrapWrapService(opts ...option.RequestOption) (r WrapWrapService)
NewWrapWrapService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WrapWrapService) New ¶
func (r *WrapWrapService) New(ctx context.Context, body WrapWrapNewParams, opts ...option.RequestOption) (res *Execution, err error)
Wrap the native asset
Source Files
¶
- aliases.go
- balance.go
- borrow.go
- borrowaccount.go
- borrowmarket.go
- borrowposition.go
- bridge.go
- bridgequote.go
- buy.go
- buybuy.go
- buyquote.go
- execution.go
- executionstep.go
- incentivize.go
- lend.go
- lendlend.go
- lendmarket.go
- lendposition.go
- lendsetcollateral.go
- lendwithdraw.go
- lock.go
- lockmarket.go
- lockposition.go
- lp.go
- lpdepositquote.go
- lppool.go
- lpposition.go
- lpwithdrawquote.go
- move.go
- price.go
- registry.go
- registryasset.go
- registryblockchain.go
- registryborrowmarket.go
- registryerror.go
- registrylendmarket.go
- registrylppool.go
- registryvenue.go
- sell.go
- sellquote.go
- sellsell.go
- vektor.go
- vote.go
- votemarket.go
- votereward.go
- wrap.go
- wrapunwrap.go
- wrapwrap.go