🛠️Data API

Get information for all tokens and latest trades on Moonshot

API calls are limited to 600 requests per minute. If you need higher rate limits please reach out to us.

Get token by pair or token id

GEThttps://api.moonshot.cc/token/v1/{chainId}/{pairIdOrTokenId}
Path parameters
chainId*string
pairIdOrTokenId*string

Pair/curve address or token address

Response

Ok

Body
url*string
chainId*string
dexId*string
pairAddress*string
baseToken*object
quoteToken*object
priceNative*string
priceUsdstring
txns*object
volume*object
makers*object
priceChange*object
liquidityobject
fdvnumber
marketCapnumber
createdAtnumber
moonshot*object
profileobject
Request
const response = await fetch('https://api.moonshot.cc/token/v1/{chainId}/{pairIdOrTokenId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "url": "text",
  "chainId": "text",
  "dexId": "text",
  "pairAddress": "text",
  "baseToken": {
    "address": "text",
    "name": "text",
    "symbol": "text"
  },
  "quoteToken": {
    "address": "text",
    "name": "text",
    "symbol": "text"
  },
  "priceNative": "text",
  "priceUsd": "text",
  "txns": {
    "m5": {},
    "h1": {},
    "h6": {},
    "h24": {}
  },
  "volume": {
    "m5": {},
    "h1": {},
    "h6": {},
    "h24": {}
  },
  "makers": {
    "m5": {},
    "h1": {},
    "h6": {},
    "h24": {}
  },
  "priceChange": {},
  "liquidity": {},
  "fdv": 0,
  "marketCap": 0,
  "createdAt": 0,
  "moonshot": {
    "curveType": "text",
    "curvePosition": "text",
    "marketcapThreshold": "text"
  },
  "profile": {
    "icon": "text",
    "banner": "text",
    "description": "text",
    "links": [
      "text"
    ]
  }
}

Get all tokens by specified view id (trending, new, etc)

GEThttps://api.moonshot.cc/tokens/v1/{viewId}/{chainId}
Path parameters
chainId*string
viewId*enum
trendingtoprisingnewfinalized
Response

Ok

Body
url*string
chainId*string
dexId*string
pairAddress*string
baseToken*object
quoteToken*object
priceNative*string
priceUsdstring
txns*object
volume*object
makers*object
priceChange*object
liquidityobject
fdvnumber
marketCapnumber
createdAtnumber
moonshot*object
profileobject
Request
const response = await fetch('https://api.moonshot.cc/tokens/v1/{viewId}/{chainId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "url": "text",
    "chainId": "text",
    "dexId": "text",
    "pairAddress": "text",
    "baseToken": {
      "address": "text",
      "name": "text",
      "symbol": "text"
    },
    "quoteToken": {
      "address": "text",
      "name": "text",
      "symbol": "text"
    },
    "priceNative": "text",
    "priceUsd": "text",
    "txns": {
      "m5": {},
      "h1": {},
      "h6": {},
      "h24": {}
    },
    "volume": {
      "m5": {},
      "h1": {},
      "h6": {},
      "h24": {}
    },
    "makers": {
      "m5": {},
      "h1": {},
      "h6": {},
      "h24": {}
    },
    "priceChange": {},
    "liquidity": {},
    "fdv": 0,
    "marketCap": 0,
    "createdAt": 0,
    "moonshot": {
      "curveType": "text",
      "curvePosition": "text",
      "marketcapThreshold": "text"
    },
    "profile": {
      "icon": "text",
      "banner": "text",
      "description": "text",
      "links": [
        "text"
      ]
    }
  }
]

Get latest trades for a specified token

GEThttps://api.moonshot.cc/trades/v1/latest/{chainId}/{pairIdOrTokenId}
Path parameters
chainId*string
pairIdOrTokenId*string

Pair/curve address or token address

Response

Ok

Body
dexId*string
blockNumber*integer
blockTimestamp*integer
pairId*string
asset0Id*string
asset1Id*string
txnId*string
maker*string
type*enum
buysell
amount0*string
amount1*string
priceNative*string
priceUsdstring
volumeUsd*string
metadataobject
Request
const response = await fetch('https://api.moonshot.cc/trades/v1/latest/{chainId}/{pairIdOrTokenId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "dexId": "text",
    "pairId": "text",
    "asset0Id": "text",
    "asset1Id": "text",
    "txnId": "text",
    "maker": "text",
    "type": "buy",
    "amount0": "text",
    "amount1": "text",
    "priceNative": "text",
    "priceUsd": "text",
    "volumeUsd": "text",
    "metadata": {
      "progress": 0,
      "curvePosition": "text"
    }
  }
]

Get latest trades for all tokens

GEThttps://api.moonshot.cc/trades/v1/latest/{chainId}
Path parameters
chainId*string
Response

Ok

Body
dexId*string
blockNumber*integer
blockTimestamp*integer
pairId*string
asset0Id*string
asset1Id*string
txnId*string
maker*string
type*enum
buysell
amount0*string
amount1*string
priceNative*string
priceUsdstring
volumeUsd*string
metadataobject
Request
const response = await fetch('https://api.moonshot.cc/trades/v1/latest/{chainId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "dexId": "text",
    "pairId": "text",
    "asset0Id": "text",
    "asset1Id": "text",
    "txnId": "text",
    "maker": "text",
    "type": "buy",
    "amount0": "text",
    "amount1": "text",
    "priceNative": "text",
    "priceUsd": "text",
    "volumeUsd": "text",
    "metadata": {
      "progress": 0,
      "curvePosition": "text"
    }
  }
]

Last updated