Protocol(LP) APIs

LP Positions

Lp positions Endpoints provides all the positions for a given a address and a protocol

unmarshal.Protocol
    .getLpPositions("pancakeswap_v2", "demo.eth")
    .then(({data}) => console.log(data))
Request
Security:
path Parameters
address
required
string
Default: "demo.eth"

Any valid address or ENS

Example: demo.eth
protocols
required
string
Default: "pancakeswap_v2"

Protocols supported (pancakeswap_v2, uniswap_v2)

Example: pancakeswap_v2
Responses
200
401
get/v2/protocols/{protocols}/address/{address}/positions
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v2/protocols/:protocols/address/:address/positions?auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "user_address": "0xfC43f5F9dd45258b3AFf31Bdbe6561D97e8B71de",
  • "positions": [
    ]
}

LP Pairs

This API provides All Available Lp pairs in a requested protocol

unmarshal.Protocol
    .getLpPairs("pancakeswap_v2")
    .then(({data}) => console.log(data))
Request
Security:
path Parameters
protocols
required
string
Default: "pancakeswap_v2"

Protocols supported (pancakeswap_v2, uniswap_v2)

Example: pancakeswap_v2
query Parameters
page
number >= 1
Default: 1

Page you want to query

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
Responses
200
401
get/v2/protocols/{protocols}/pairs
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v2/protocols/:protocols/pairs?page=1&pageSize=5&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "total": 957575,
  • "protocol_pairs": [
    ]
}

LP Transactions

Lp transactions Endpoints provide all the transactions for a given address and a protocol.

unmarshal.Protocol
    .getLpTransactions("pancakeswap_v2", "demo.eth")
    .then(({data}) => console.log(data))
Request
Security:
path Parameters
address
required
string
Default: "demo.eth"

Any valid address or ENS

Example: demo.eth
protocols
required
string
Default: "pancakeswap_v2"

Protocols supported (pancakeswap_v2, uniswap_v2)

Example: pancakeswap_v2
query Parameters
page
number >= 1
Default: 1

Page you want to query

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
Responses
200
401
get/v2/protocols/{protocols}/address/{address}/lp_transactions
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v2/protocols/:protocols/address/:address/lp_transactions?page=1&pageSize=5&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "user_address": "0xfC43f5F9dd45258b3AFf31Bdbe6561D97e8B71de",
  • "transactions": [
    ]
}