Constellation PacaSwap Metagraph (0.0.1)

Download OpenAPI specification:

API for the PacaSwap Metagraph Layer 0 node handling swaps, liquidity pools, voting and governance

Swap

Manages swap operations and queries

Get swap quote

Get a quote for swapping one token for another, including rate, price impact, and estimated amounts

Request Body schema: application/json
required

Swap quote parameters

fromTokenId
required
string

Source token currency ID

toTokenId
required
string

Destination token currency ID

amount
required
integer

Amount of fromToken to swap

slippagePercent
number [ 0 .. 100 ]

Maximum acceptable slippage as a percentage

Responses

Request samples

Content type
application/json
{
  • "fromTokenId": "string",
  • "toTokenId": "string",
  • "amount": 0,
  • "slippagePercent": 100
}

Response samples

Content type
application/json
{
  • "fromTokenId": "string",
  • "toTokenId": "string",
  • "amount": 0,
  • "rate": 0,
  • "slippagePercent": 0,
  • "priceImpactPercent": 0,
  • "estimatedReceived": 0,
  • "minimumReceived": 0
}

Get the reverse swap quote

Get a quote for swapping one token for another, including rate, price impact, and estimated amounts. This endpoint requires the desired output and then we calculate the required input

Request Body schema: application/json
required

Swap quote parameters

fromTokenId
required
string

Source token currency ID

toTokenId
required
string

Destination token currency ID

amount
required
integer

Amount of fromToken to swap

slippagePercent
number [ 0 .. 100 ]

Maximum acceptable slippage as a percentage

Responses

Request samples

Content type
application/json
{
  • "fromTokenId": "string",
  • "toTokenId": "string",
  • "amount": 0,
  • "slippagePercent": 100
}

Response samples

Content type
application/json
{
  • "fromTokenId": "string",
  • "toTokenId": "string",
  • "desiredOutputAmount": 0,
  • "rate": 0,
  • "slippagePercent": 0,
  • "priceImpactPercent": 0,
  • "requiredInputAmount": 0,
  • "maxInputRequired": 0
}

Get swap details

Retrieve swap information by swap hash.

path Parameters
swapHash
required
string

Hash of the swap data update

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get last swap reference

Retrieve the last swap reference for a specific address

path Parameters
address
required
string

Address to query

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

LPs

Manages liquidity pool operations

List liquidity pools

List all liquidity pools

query Parameters
limit
integer [ 1 .. 100 ]
Default: 10

Maximum number of items to return

offset
integer >= 0
Default: 0

Number of items to skip

address
string
Example: address=DAGaa99YgUGKQef92D34FGRBGnAiKUBoEmjNoIrL

Address with pool shares

tokenId
string
Examples:
  • tokenId=DAG - Native DAG token
  • tokenId=DAGaa99YgUGKQef92D34FGRBGnAiKUBoEmjNoIrL - Token represented by a DAG address

Pools with tokenId

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Show liquidity pool

Show liquidity pool by pool ID

path Parameters
poolId
required
string

Unique identifier of the liquidity pool

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get liquidity pool shares

Get the amount of shares an address holds in a specific liquidity pool

path Parameters
poolId
required
string non-empty

Unique identifier of the liquidity pool

address
required
string non-empty

Address to query shares for

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get liquidity pool update details

Retrieve liquidity pool update information by lp hash.

path Parameters
lpHash
required
string

Hash of the lp data update

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Vote

Handles voting operations and weight calculations

Get address voting info

Retrieve voting information for a specific address including credits and allocations

path Parameters
address
required
string

Address to query

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get last vote reference

Retrieve the last reference for vote information of a specific address

path Parameters
address
required
string

Address to query

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get voting weight

Retrieve the vote weight for a specific address based on token locks

path Parameters
address
required
string

Address to query

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Governance Rounds

Information about governance voting

Get allocation result for previous month

Retrieve current governance allocation

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Total distributed reward for previous month

Retrieve previous month reward distribution per type

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Total distributed reward for current month

Retrieve current reward distribution per type

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Current allocation (vote) process status

Retrieve current allocation data

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Current month-reference process status

Retrieve current month-reference data

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Governance stats

Governance stats

Responses

Response samples

Content type
application/json
{ }

Staking

Manages staking operations

Get last staking reference

Retrieve the last staking reference for a specific address

path Parameters
address
required
string

Address to query

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get staking update details

Retrieve staking update information by staking hash.

path Parameters
stakingHash
required
string

Hash of the staking data update

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Withdrawals

Manages withdrawal operations and references

Get last withdrawal reference

Retrieve the last withdrawal reference for a specific address

path Parameters
address
required
string

Address to query

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get withdrawal update details

Retrieve withdrawal update information by withdrawal hash.

path Parameters
withdrawalHash
required
string

Hash of the withdrawal data update

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Reward Withdrawals

Manages reward withdrawals

Get last reward withdrawal reference

Retrieve the last reward withdrawal reference for a specific address

path Parameters
address
required
string

Address to query

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get wallet reward available balances

Get wallet reward available balances

path Parameters
address
required
string

Address to query

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Health Check

Get information about the healthiness of the node

Get last global snapshot sync by node

Get last global snapshot sync by node

Responses

Get last global snapshot sync by node

Get last global snapshot sync by node

Responses

Response samples

Content type
application/json
{
  • "lastSyncGlobalSnapshotOrdinal": 0
}

Config

Get information about the metagraph config

Get the metagraph config

Get the metagraph config

Responses

Response samples

Content type
application/json
{ }