Niftyswap Marketplace
Niftyswap is a Semi-Fungible Token (SFT) AMM protocol for fully automated collectible marketplace that runs on every EVM network.
While Uniswap is for trading coins (ERC-20 tokens), Niftyswap is a protocol dedicated to trading SFTs (ERC-1155 tokens). Both are designed to favor ease of use and provide access to liquidity on-chain.
Niftyswap is a Horizon product that's powered by Sequence. Reach out on our discord with any questions or feedback! https://discord.gg/sequence
Market API
Our marketplace is equipped with an REST endpoint that you can use to query for market information
Sequence Metadata GetNiftyswapUnitPricesWithQuantities
Method:
- Request: POST /rpc/Indexer/GetNiftyswapUnitPricesWithQuantities
- Content-Type: application/json
- Body (in JSON):
chainId
(string) -- the string of the network (e.g. 'polygon')contractAddress
(string) -- the contract addressreq
(Object) -- the request as a jsonswapType
(string) -- the swap type (e.g. 'BUY' or 'SELL')ids
(string[]) -- the token ids of the assets you're looking atamounts
(string[]) -- the amount of tokens you're looking to tradefresh
(boolean) -- set this to true to get the latest non-cached price data at the current block
Example: GetNiftyswapUnitPricesWithQuantities
of token ids with amounts from a contract address on Polygon
- curl
- Javascript / Typescript
- Other
curl -X POST -H "Content-Type: application/json" https://metadata.sequence.app/rpc/Metadata/GetNiftyswapUnitPricesWithQuantities -d '{"chainID":"137","contractAddress":"0x8bb759bb68995343ff1e9d57ac85ff5c5fb79334","req":{"swapType":"BUY","ids":["65537"],"amounts":["100"]},"fresh":true}'
// Works in both a Webapp (browser) or Node.js:
import fetch from 'cross-fetch';
(async () => {
const res = await fetch('https://metadata.sequence.app/rpc/Metadata/GetNiftyswapUnitPricesWithQuantities', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'chainID': '137',
'contractAddress': '0x8bb759bb68995343ff1e9d57ac85ff5c5fb79334',
'req': {
'swapType': 'BUY',
'ids': [
'65537'
],
'amounts': [
'100'
]
},
'fresh': true
})
});
console.log('res', await res.json())
})()
Please contact our team for assistance with integrations to another target.