Documentation ¶
Index ¶
Constants ¶
View Source
const ( USDC = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" WETH = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" WBTC = "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599" USDCDecimals = 6 OTokensDecimals = 8 WETHDecimals = 18 WBTCDecimals = 8 )
Variables ¶
This section is empty.
Functions ¶
func QueryTheGraph ¶
func QueryTheGraph() []opyn.OptionsOtokensOToken
Types ¶
type Quote ¶
type Quote struct { BuyTokenToEthRate string `json:"buyTokenToEthRate"` Price string `json:"price"` GuaranteedPrice string `json:"guaranteedPrice"` To string `json:"to"` Data string `json:"data"` Value string `json:"value"` Gas string `json:"gas"` EstimatedGas string `json:"estimatedGas"` GasPrice string `json:"gasPrice"` ProtocolFee string `json:"protocolFee"` MinimumProtocolFee string `json:"minimumProtocolFee"` BuyTokenAddress string `json:"buyTokenAddress"` SellTokenAddress string `json:"sellTokenAddress"` BuyAmount string `json:"buyAmount"` SellAmount string `json:"sellAmount"` SellTokenToEthRate string `json:"sellTokenToEthRate"` AllowanceTarget string `json:"allowanceTarget"` Orders []struct { Source string `json:"source"` MakerToken string `json:"makerToken"` TakerToken string `json:"takerToken"` MakerAmount string `json:"makerAmount"` TakerAmount string `json:"takerAmount"` FillData struct { Order struct { Sender string `json:"sender"` Maker string `json:"maker"` Taker string `json:"taker"` TakerTokenFeeAmount string `json:"takerTokenFeeAmount"` MakerAmount string `json:"makerAmount"` TakerAmount string `json:"takerAmount"` MakerToken string `json:"makerToken"` TakerToken string `json:"takerToken"` Salt string `json:"salt"` VerifyingContract string `json:"verifyingContract"` FeeRecipient string `json:"feeRecipient"` Expiry string `json:"expiry"` Pool string `json:"pool"` ChainID int `json:"chainId"` } `json:"order"` FillableTakerAmount string `json:"fillableTakerAmount"` FillableMakerAmount string `json:"fillableMakerAmount"` FillableTakerFeeAmount string `json:"fillableTakerFeeAmount"` Signature struct { R string `json:"r"` S string `json:"s"` SignatureType int `json:"signatureType"` V int `json:"v"` } `json:"signature"` Type int `json:"type"` } `json:"fillData"` Type int `json:"type"` } `json:"orders"` Sources []struct { Name string `json:"name"` Proportion string `json:"proportion"` } `json:"sources"` ChainID int `json:"chainId"` }
type Record ¶
type Record struct { MetaData struct { CreatedAt time.Time `json:"createdAt"` OrderHash string `json:"orderHash"` RemainingFillableTakerAmount string `json:"remainingFillableTakerAmount"` } `json:"metaData"` Order struct { Pool string `json:"pool"` Sender string `json:"sender"` Maker string `json:"maker"` Taker string `json:"taker"` TakerTokenFeeAmount string `json:"takerTokenFeeAmount"` MakerAmount string `json:"makerAmount"` TakerAmount string `json:"takerAmount"` MakerToken string `json:"makerToken"` TakerToken string `json:"takerToken"` Salt string `json:"salt"` VerifyingContract string `json:"verifyingContract"` FeeRecipient string `json:"feeRecipient"` Expiry string `json:"expiry"` Signature struct { R string `json:"r"` S string `json:"s"` SignatureType int `json:"signatureType"` V int `json:"v"` } `json:"signature"` ChainID int `json:"chainId"` } `json:"order"` }
Click to show internal directories.
Click to hide internal directories.