This server is meant to aggregate data from different subgraphs under a single API.
npm install
After that you'll need to up check the .env.example
file and create your own .env
file. Some properties have defaults. Once you're done, you can run the project!
npm start # start the server
npm run start:watch # will watch for changes
Endpoint: /v1/nfts
Type:
type NFT = {
id: string
contractAddress: string
tokenId: string
activeOrderId: string | null
owner: string
name: string
category: NFTCategory
image: string
url: string
issuedId: string | null
itemId: string | null
data: Data
network: Network
chainId: ChainId
createdAt: number
updatedAt: number
}
Query Params:
first
: Limit the number of results. Type:number
.skip
: Skip results. Type:number
.sortBy
: Sort results. Possible values:newest
,name
,recently_listed
,recently_sold
,cheapest
.category
: Filter byNFTCategory
. Possible values:parcel
,estate
,wearable
,ens
.owner
: Filter by owner. Type:address
.isOnSale
: Only return results that have an open, non-expired listing. Type:boolean
.search
: Free text search. Type:string
.isLand
: Only return results that theircategory
is eitherparcel
orestate
.isWearableHead
: Only return results that their category iswearable
and are part of the avatar's head. Typeboolean
.isWearableAccessory
: Only return results that their category iswearable
and accessories (not a part of the body).isWearableSmart
: Only return smart wearables. Typeboolean
.wearableCategory
: Filter results byWearableCategory
. Possible values:eyebrows
,eyes
,facial_hair
,hair
,mouth
,upper_body
,lower_body
,feet
,earring
,eyewear
,hat
,helmet
,mask
,tiara
,top_head
,skin
.wearableGender
: Filter results byWearableGender
. It supports multiple values by adding the query param multiple times. Possible values:male
,female
.contractAddress
: Filter results by contract address. It supports multiple values by adding the query param multiple times. Type:address
.tokenId
: Filter results bytokenId
. Type:string
.itemRarity
: Filter results byRarity
. It supports multiple values by adding the query param multiple times. Possible values:unique
,mythic
,legendary
,epic
,rare
,uncommon
,common
.itemId
: Filter results byitemId
. Typestring
.network
: Filter results byNetwork
. Possible values:ETHEREUM
,MATIC
.
Endpoint: /v1/items
Type:
type Item = {
id: string
name: string
thumbnail: string
url: string
category: NFTCategory
contractAddress: string
itemId: string
rarity: Rarity
price: string
available: number
isOnSale: boolean
creator: string
data: Data
network: Network
chainId: ChainId
createdAt: number
updatedAt: number
reviewedAt: number
soldAt: number
}
Query Params:
first
: Limit the number of results. Type:number
.skip
: Skip results. Type:number
.sortBy
: Sort results. Possible values:newest
,recently_reviewed
,recently_sold
,name
,cheapest
.creator
: Filter by creator. Type:address
.rarity
: Filter results byRarity
. It supports multiple values by adding the query param multiple times. Possible values:unique
,mythic
,legendary
,epic
,rare
,uncommon
,common
.isSoldOut
: Only return results that are sold out (all NFTs have been minted). Type:boolean
.isOnSale
: Only return results that can be bought (CollectionStore
has been added as minter, and there's still available supply to mint). Type:boolean
.search
: Free text search. Type:string
.isWearableHead
: Only return results that their category iswearable
and are part of the avatar's head. Typeboolean
.isWearableAccessory
: Only return results that their category iswearable
and accessories (not a part of the body).isWearableSmart
: Only return smart wearables. Typeboolean
.wearableCategory
: Filter results byWearableCategory
. Possible values:eyebrows
,eyes
,facial_hair
,hair
,mouth
,upper_body
,lower_body
,feet
,earring
,eyewear
,hat
,helmet
,mask
,tiara
,top_head
,skin
.wearableGender
: Filter results byWearableGender
. It supports multiple values by adding the query param multiple times. Possible values:male
,female
.emoteCategory
: Filter results byEmoteCategory
. Possible values:dance
,stunt
,greetings
,fun
,poses
,reactions
,horror
,miscellaneous
.emoteGender
: Filter results byWearableGender
. It supports multiple values by adding the query param multiple times. Possible values:male
,female
.emotePlayMode
: Filter results byEmotePlayMode
. Possible values:simple
,loop
contractAddress
: Filter results by contract address. It supports multiple values by adding the query param multiple times. Type:address
.itemId
: Filter results byitemId
. Type:string
.network
: Filter results byNetwork
. Possible values:ETHEREUM
,MATIC
.
Endpoint: /v1/orders
Type:
type Order = {
id: string
nftId: string
marketplaceAddress: string
contractAddress: string
tokenId: string
owner: string
buyer: string | null
price: string
status: OrderStatus
expiresAt: number
network: Network
chainId: ChainId
createdAt: number
updatedAt: number
}
Query Params:
first
: Limit the number of results. Type:number
.skip
: Skip results. Type:number
.sortBy
: Sort results. Possible values:recently_listed
,recently_updated
,cheapest
.marketplaceAddress
: Filter results by marketplace contract address. Type:address
.owner
: Filter by owner. Type:address
.buyer
: Filter by buyer. Type:address
.contractAddress
: Filter results by contract address. Type:address
.tokenId
: Filter results bytokenId
. Type:string
.status
: Filter results byOrderStatus
. Possible values:open
,sold
,cancelled
.network
: Filter results byNetwork
. Possible values:ETHEREUM
,MATIC
.
Endpoint: /v1/bids
Type:
type Bid = {
id: string
bidAddress: string
bidder: string
seller: string
price: string
fingerprint: string
status: BidStatus
blockchainId: string
blockNumber: string
expiresAt: number
contractAddress: string
tokenId: string
network: Network
chainId: ChainId
createdAt: number
updatedAt: number
}
Query Params:
first
: Limit the number of results. Type:number
.skip
: Skip results. Type:number
.sortBy
: Sort results. Possible values:recently_offered
,recently_updated
,most_expensive
.bidAddress
: Filter results by bid contract address. Type:address
.bidder
: Filter by bidder. Type:address
.seller
: Filter by seller. Type:address
.contractAddress
: Filter results by contract address. Type:address
.tokenId
: Filter results bytokenId
. Type:string
.status
: Filter results byBidStatus
. Possible values:open
,sold
,cancelled
.network
: Filter results byNetwork
. Possible values:ETHEREUM
,MATIC
.
Endpoint: /v1/mints
Type:
type Mint = {
id: string
creator: string
beneficiary: string
minter: string
itemId: string
tokenId: string
issuedId: string
contractAddress: string
price: string | null
timestamp: number
network: Network
chainId: ChainId
}
Query Params:
first
: Limit the number of results. Type:number
.skip
: Skip results. Type:number
.sortBy
: Sort results. Possible values:recently_minted
,most_expensive
.creator
: Filter by creator. Type:address
.beneficiary
: Filter by beneficiary. Type:address
.minter
: Filter by minter. Type:address
.contractAddress
: Filter results by contract address. Type:address
.tokenId
: Filter results bytokenId
. Type:string
.itemId
: Filter results byitemId
. Type:string
.issuedId
: Filter results byissuedId
. Type:string
.isSale
: Return only mints that came from a sale.network
: Filter results byNetwork
. Possible values:ETHEREUM
,MATIC
.
Endpoint: /v1/sales
Type:
export type Sale = {
id: string
type: SaleType
buyer: string
seller: string
itemId: string | null
tokenId: string
contractAddress: string
price: string
timestamp: number
txHash: string
network: Network
chainId: ChainId
}
Query Params:
first
: Limit the number of results. Type:number
.skip
: Skip results. Type:number
.sortBy
: Sort results. Possible values:recently_sold
,most_expensive
.type
: Filter by sale type. Possible values:order
,bid
,mint
.category
: Filter by NFT category. It supports multiple values by adding the query param multiple times. Possible values:parcel
,estate
,ens
,wearable
.seller
: Filter by seller. Type:address
.buyer
: Filter by buyer. Type:address
.contractAddress
: Filter results by contract address. Type:address
.tokenId
: Filter results bytokenId
. Type:string
.itemId
: Filter results byitemId
. Type:string
.from
: Return only sales that happened after this timestamp. Typenumber
.to
: Return only sales that happened before this timestamp. Typenumber
.minPrice
: Return only sales with a price higher than this. Typenumber
.maxPrice
: Return only sales with a price lower than this. Typenumber
.network
: Filter results byNetwork
. Possible values:ETHEREUM
,MATIC
.
Endpoint: /v1/accounts
Type:
export type Account = {
id: string
address: string
sales: number
purchases: number
spent: string
earned: string
royalties: string
}
Query Params:
first
: Limit the number of results. Type:number
.skip
: Skip results. Type:number
.sortBy
: Sort results. Possible values:most_sales
,most_purchases
,most_spent
,most_earned
,most_royalties
.id
: Filter by user address. Type:string
.address
: Currently the same as id, Filter by user address. Type: 'string'.network
: Filter results byNetwork
. Possible values:ETHEREUM
,MATIC
.
Endpoint: /v1/collections
Type:
export type Collection = {
urn: string
name: string
creator: string
contractAddress: string
isOnSale: boolean
size: number
createdAt: number
updatedAt: number
reviewedAt: number
network: Network
chainId: ChainId
}
Query Params:
first
: Limit the number of results. Type:number
.skip
: Skip results. Type:number
.sortBy
: Sort results. Possible values:newest
,name
,recently_reviewed
,size
.name
: Filter by the collection name. Type:string
.search
: Filter collections containing the search value in its name, case insensitive. Type:string
.creator
: Filter by creator. Type:address
.contractAddress
: Filter results by contract address. Type:address
.isOnSale
: Return only collections are currently on sale. Type:boolean
.network
: Filter results byNetwork
. Possible values:ETHEREUM
,MATIC
.
Endpoint: /v1/contracts
Type:
type Contract = {
name: string
address: string
category: NFTCategory
network: Network
chainId: ChainId
}
Query Params:
first
: Limit the number of results. Type:number
.skip
: Skip results. Type:number
.sortBy
: Sort results. Possible values:name
.category
: Filter byNFTCategory
. Possible values:parcel
,estate
,wearable
,ens
.network
: Filter results byNetwork
. Possible values:ETHEREUM
,MATIC
.
Endpoint: /v1/analytics/:timeframe
Type:
type AnalyticsDayData = {
id: string
date: number
sales: number
volume: string
creatorsEarnings: string
daoEarnings: string
}
URL Params:
timeframe
: The timeframe within the analytic data was gather. Possible values:day
|week
|month
|all
Endpoint: /v1/volume/:timeframe
Type:
type VolumeData = {
sales: number
volume: string
creatorsEarnings: string
daoEarnings: string
}
URL Params:
timeframe
: The timeframe within the analytic data was gather. Possible values:day
|week
|month
|all
Endpoint: /v1/trendings
Type:
type Item = {
id: string
name: string
thumbnail: string
url: string
category: NFTCategory
contractAddress: string
itemId: string
rarity: Rarity
price: string
available: number
isOnSale: boolean
creator: string
beneficiary: string | null
createdAt: number
updatedAt: number
reviewedAt: number
soldAt: number
data: NFT['data']
network: Network
chainId: ChainId
}
Query Params:
size
: The amount of trending items to return
Endpoint: /v1/rankings/:timeframe
Type:
type RankingItem = {
id: string
sales: number
volume: string
}
URL Params:
timeframe
: The timeframe within the analytic data was gather. Possible values:day
|week
|month
|all
entity
: The entity that wants to get ranked. Possible values:items
|creators
|collectors
Query Params:
first
: Limit the number of results. Type: number.rarity
: Filter the results by the rarity. Possible values:unique
,mythic
,legendary
,epic
,rare
,uncommon
,common
.category
: Filter the results by wearable category. Possible values:eyebrows
,eyes
,facial_hair
,hair
,mouth
,upper_body
,lower_body
,feet
,earring
,eyewear
,hat
,helmet
,mask
,tiara
,top_head
,skin
.