Futureswap Subgraph

Resources

Subgraph Explore for querying data and endpoints for developers.

Get trades (Both long and close)

trades(first: 1) {
id
tradeId
trader
tradeValue
isOpen
isLong
timestamp
percentToClose
}

Get open trades

openedTrades(first: 1) {
id
tradeId
trader
leverage
collateral
openFee
assetMarketPrice
isLong
stablePrice
timestamp
}

Get close trades

closedTrades(first: 1) {
id
tradeId
trader
referral
stablePrice
isLong
percentToClose
openFee
assetOpenPrice
assetRedemptionAmount
assetMarketPrice
isLiquidated
timestamp
}

Get added collateral

addedCollaterals(first:1){
id
tradeId
trader
addedCollateral
timestamp
}

Get liquidated trades

liquidatedTrades(first:1){
id
tradeId
trader
liquidator
stableToSendLiquidator
stableToSendTradeOwner
timestamp
}

Get liquidity updates (add and remove)

updatedLiquidities(first:1){
id
provider
assetTokenAmount
stableTokenAmount
liquidityTokenAmount
isAdding
timestamp
}