Velora Developer Docs
VeloraUser Documentation
  • API
    • Velora API
      • Velora Delta API
        • Overview
        • Contracts
        • Retrieve Delta price with fallback to Market
        • Retrieve details for creating cross-chain order
        • Build a Delta Order to Sign
        • Submit a Delta Order
        • Track Delta Order Auction Status
        • Example: Quote With Fallback
      • Velora Market API
        • Overview
        • API Versions
          • API v6.2
          • API v5
        • Retrieve a price: /prices
        • Build a transaction: /transactions
        • Get Price & Calldata: /swap
        • Example: Fetch Price & Build Transaction
    • Get Tokens List
    • Limit Orders
      • Introduction
      • Contracts
      • On chain Data Structure
      • Data structure in our centralized system
      • API References
        • Fungible tokens
          • Create a limit order
          • Create a p2p limit order
          • Get limit orders by maker
          • Get limit orders by taker
          • Get Pairs
          • Get Orderbook
          • Fill a limit order
          • Cancel a limit order
        • NFT
          • Create an order
          • Create a p2p order
          • Get NFT orders by maker
          • Get NFT orders by taker
          • Get Pairs
          • Get orderbook
          • Fill a limit order
          • Cancel a limit order
      • SDK
        • Typescript
        • Python
  • AugustusRFQ API Specification
  • Augustus Swapper
    • Augustus v6.2
    • Augustus v5
  • Subgraphs
  • Security
    • Augustus V6.2
    • Augustus V6.1
    • Augustus RFQ
    • Augustus V5
  • Help Center
Powered by GitBook
On this page
  • GET /ft/orders/:chainId/taker/:address
  • GET /ft/p2p/:chainId/taker/:address (for p2p)
Export as PDF
  1. API
  2. Limit Orders
  3. API References
  4. Fungible tokens

Get limit orders by taker

GET /ft/orders/:chainId/taker/:address

Examples

curl -X GET \
  'https://api.paraswap.io/ft/orders/137/taker/0x05182E579FDfCf69E4390c3411D8FeA1fb6467cf'
/* eslint-disable @typescript-eslint/no-unused-vars */
import axios from 'axios';

import {
  constructPartialSDK,
  constructAxiosFetcher,
  constructGetLimitOrders,
} from '..';

const fetcher = constructAxiosFetcher(axios);

const paraSwapLimitOrderSDK = constructPartialSDK(
  {
    chainId: 1,
    fetcher,
  },
  constructGetLimitOrders
);

async function run() {
  const orders = await paraSwapLimitOrderSDK.getLimitOrders({
    taker: 'curl -X GET \
  'https://api.paraswap.io/ft/orders/137/maker/0x05182E579FDfCf69E4390c3411D8FeA1fb6467cf'curl -X GET \
  'https://api.paraswap.io/ft/orders/137/maker/0x05182E579FDfCf69E4390c3411D8FeA1fb6467cf'az',
    type: 'LIMIT',
  });
  console.log('orders', orders);
}

run();
network = Network.Polygon

api_url = "https://api.paraswap.io/"

# get ftApi object instance
# fungible api is a wrapper to our limit orders api
ftApi = create_fungible_api(network, api_url)

ordersResponse = ftApi.get_orders_by_taker("taker address")

GET /ft/p2p/:chainId/taker/:address (for p2p)

Examples

curl -X GET \
  'https://api.paraswap.io/ft/p2p/137/taker/0x05182E579FDfCf69E4390c3411D8FeA1fb6467cf'
/* eslint-disable @typescript-eslint/no-unused-vars */
import axios from 'axios';

import {
  constructPartialSDK,
  constructAxiosFetcher,
  constructGetLimitOrders,
} from '..';

const fetcher = constructAxiosFetcher(axios);

const paraSwapLimitOrderSDK = constructPartialSDK(
  {
    chainId: 1,
    fetcher,
  },
  constructGetLimitOrders
);

async function run() {
  const p2pOrders = await paraSwapLimitOrderSDK.getLimitOrders({
    taker: '0x05182E579FDfCf69E4390c3411D8FeA1fb6467cf',
    type: 'P2P',
  });
  console.log('p2pOrders', p2pOrders);
}

run();

Query parameters:

  • chainId:network id (Ethereum Mainnet = 1).

  • address: will return you the orders in which taker == address.

  • limit (Optional): max count of orders.

  • offset (Optional): pagination offset.

  • hideSmallBalances (Optional, default: false): boolean if true will hide all orders in which 99.99% of the value has already been swapped.

Response

Understand the response by checking our dedicated page:

{
	"limit": 2,
	"offset": 0,
	"orders": [
		{
			"expiry": 0,
			"createdAt": 1661162877,
			"updatedAt": 1661162877,
			"transactionHash": null,
			"chainId": 137,
			"nonceAndMeta": "7433034152904838547212883274543254857465784035140417181410394112",
			"maker": "0x05182e579fdfcf69e4390c3411d8fea1fb6467cf",
			"taker": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
			"takerFromMeta": "0x0000000000000000000000000000000000000000",
			"makerAsset": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
			"takerAsset": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
			"makerAmount": "10000000000000000",
			"fillableBalance": "10000000000000000",
			"swappableBalance": "0",
			"makerBalance": "10000000000000000",
			"isFillOrKill": false,
			"takerAmount": "7775870000000000",
			"signature": "0x43dd8dbc8228594171d0ed3e633ca0eb5c24f46bf0575100623ae56723712f807ecaf7dc8edfcf0d4517f80f11bf016bde0a9a20e243eea2bb32e55eadbb6b0d1b",
			"orderHash": "0xdef400fd95d028d8caaba2c4887d2694563e0bc7f73c17d747feac2e24ed411d",
			"permitMakerAsset": null,
			"type": "LIMIT",
			"state": "PENDING"
		},
		{
			"expiry": 0,
			"createdAt": 1661102635,
			"updatedAt": 1661162851,
			"transactionHash": "0x235aaa8472de0a724ea09daee5f2ed57d4365753d521008bcd9550d83a4461c7",
			"chainId": 137,
			"nonceAndMeta": "5138925241883764339325856218512467102197816820790096695352360960",
			"maker": "0x05182e579fdfcf69e4390c3411d8fea1fb6467cf",
			"taker": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
			"takerFromMeta": "0x0000000000000000000000000000000000000000",
			"makerAsset": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
			"takerAsset": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
			"makerAmount": "1000000",
			"fillableBalance": "27806",
			"swappableBalance": "27806",
			"makerBalance": "27806",
			"isFillOrKill": false,
			"takerAmount": "999800000000000000",
			"signature": "0x98e2cbd4e56290665c8301b7fd8b2590ce4d1e46fa674be601efef48f07599bf7f5cd7b1dc95653a3736bf06da0a41f251f85546ebe72491cd21a240b70ef66f1c",
			"orderHash": "0xef9fdf84be98cc70c05dbfe62af88412c1231f3025d3c829cf93b29f578a66fd",
			"permitMakerAsset": null,
			"type": "LIMIT",
			"state": "CANCELLED"
		}
	]
}

Last updated 2 years ago

Data structure in our centralized system