Transactions End-points

This page details all the User Transaction queries. A query returns a max of 20 Transactions.

The Transactions end-points below will be deprecated by end Q1 2024. Please refer to the NEW User Pre-Classified Transactions end-points, available here.

getUserTxHistory

Get all transaction information for a specific user

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/history/all/{userAddress}

When the startTime is set, this end-point will get the latest 20 Tx prior to that date.

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

pageCount

integer

Page Count (maximum count is 20)

startTime

long

The returned history list are earlier than this time, if it's not provided, we will return the number of recent entries.

{
  "avax": [
    {
      "active": true,
      "balances": [
        {
          "balance": 0,
          "balanceUSD": 0,
          "tokenAddress": "string",
          "tokenDecimals": 0,
          "tokenName": "string",
          "tokenSymbol": "string"
        }
      ],
      "block": 0,
      "hash": "string",
      "id": "string",
      "order": 0,
      "pnlUsd": 0,
      "positionYield": {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      },
      "protocol": "string",
      "timeStamp": 0,
      "txFee": 0,
      "txFeeUsd": 0,
      "txType": "string",
      "yieldUSD": 0,
      "yields": [
        {
          "balance": 0,
          "balanceUSD": 0,
          "tokenDecimals": 0,
          "tokenSymbol": "string"
        }
      ]
    }
  ],
  "eth": [
    {
      "active": true,
      "balances": [
        {
          "balance": 0,
          "balanceUSD": 0,
          "tokenAddress": "string",
          "tokenDecimals": 0,
          "tokenName": "string",
          "tokenSymbol": "string"
        }
      ],
      "block": 0,
      "hash": "string",
      "id": "string",
      "order": 0,
      "pnlUsd": 0,
      "positionYield": {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      },
      "protocol": "string",
      "timeStamp": 0,
      "txFee": 0,
      "txFeeUsd": 0,
      "txType": "string",
      "yieldUSD": 0,
      "yields": [
        {
          "balance": 0,
          "balanceUSD": 0,
          "tokenDecimals": 0,
          "tokenSymbol": "string"
        }
      ]
    }
  ]
}
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/userTx/history/all/{userAddress}'

getUserTxHistoryWithPnl

Get all transaction information for a specific user (including PNL)

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/historyWithPnl/all/{userAddress}

When the startTime is set, this end-point will get the latest 20 Tx prior to that date.

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

pageCount

integer

Page Count (maximum count is 20)

startTime

long

The returned history list are earlier than this time, if it's not provided, we will return the number of recent entries.

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]
curl -X GET --header 'Accept: application/json'
 'https://api-v1.mymerlin.io/api/merlin/public/userTx/historyWithPnl/all/{userAddress}'

getUserTxHistoryByChain

Get all transaction information for a specific user and chain

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/history/{userAddress}

When the startTime is set, this end-point will get the latest 20 Tx prior to that date.

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

pageCount

integer

Page Count (maximum count is 20)

startTime

long

The returned history list are earlier than this time, if it's not provided, we will return the number of recent entries.

chain*

string

Chain name

{
  "avax": [
    {
      "active": true,
      "balances": [
        {
          "balance": 0,
          "balanceUSD": 0,
          "tokenAddress": "string",
          "tokenDecimals": 0,
          "tokenName": "string",
          "tokenSymbol": "string"
        }
      ],
      "block": 0,
      "hash": "string",
      "id": "string",
      "order": 0,
      "pnlUsd": 0,
      "positionYield": {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      },
      "protocol": "string",
      "timeStamp": 0,
      "txFee": 0,
      "txFeeUsd": 0,
      "txType": "string",
      "yieldUSD": 0,
      "yields": [
        {
          "balance": 0,
          "balanceUSD": 0,
          "tokenDecimals": 0,
          "tokenSymbol": "string"
        }
      ]
    }
  ],
  "eth": [
    {
      "active": true,
      "balances": [
        {
          "balance": 0,
          "balanceUSD": 0,
          "tokenAddress": "string",
          "tokenDecimals": 0,
          "tokenName": "string",
          "tokenSymbol": "string"
        }
      ],
      "block": 0,
      "hash": "string",
      "id": "string",
      "order": 0,
      "pnlUsd": 0,
      "positionYield": {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      },
      "protocol": "string",
      "timeStamp": 0,
      "txFee": 0,
      "txFeeUsd": 0,
      "txType": "string",
      "yieldUSD": 0,
      "yields": [
        {
          "balance": 0,
          "balanceUSD": 0,
          "tokenDecimals": 0,
          "tokenSymbol": "string"
        }
      ]
    }
  ]
}
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/userTx/history
/{userAddress}?chain={chain}'

getUserTxHistoryByChainWithPnl

Get all transaction information for a specific user and chain (including PNL)

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/historyWithPnl

When the startTime is set, this end-point will get the latest 20 Tx prior to that date.

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

chain*

string

Chain name

pageCount

integer

Page Count (maximum count is 20)

startTime

long

The returned history list are earlier than this time, if it's not provided, we will return the number of recent entries.

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]
curl -X GET --header 'Accept: application/json'
 'https://api-v1.mymerlin.io/api/merlin/public/userTx/historyWithPnl/{userAddress}'

getAllUserTxHistoryByPeriod

Get a list of transactions for a specific user for a certain period of time

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/historyByTimeFrame/all/{userAddress}

By using this end-point, please note that charges may be different depending on the amount of Tx that exists during the specified timeframe.

This end point can get you up to 100 Tx. If in specified time frame there are more than 20 transactions, the system will automatically create a new call to get all the Tx during this timeframe. For example, if there is 30 Tx (between startTime and endTime), the system will charge you 2 calls, if there are 55 Tx, the system will charge you 3 calls. The maximum you can be charged is 5 calls (to retrieve the 100 Tx)

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

pageCount

integer

Page Count (maximum count is 20)

startTime

long

The returned history list are earlier than this time, if it's not provided, we will return the number of recent entries

endTime

long

The returned history list are after this time. endTime timestamp should be before startTime

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]
curl -X GET --header 'Accept: application/json'
 'https://api-v1.mymerlin.io/api/merlin/public/userTx/historyByTimeFrame/all/{userAddress}'

getAllUserTxHistoryByPeriodWithPnl

Get a list of transactions for a specific user for a certain period of time (including PNL)

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/historyByTimeFrameWithPnl/all/{userAddress}

By using this end-point, please note that charges may be different depending on the amount of Tx that exists during the specified timeframe.

This end point can get you up to 100 Tx. If in specified time frame there are more than 20 transactions, the system will automatically create a new call to get all the Tx during this timeframe. For example, if there is 30 Tx (between startTime and endTime), the system will charge you 2 calls, if there are 55 Tx, the system will charge you 3 calls. The maximum you can be charged is 5 calls (to retrieve the 100 Tx)

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

pageCount

integer

Page Count (maximum count is 20)

startTime

long

The returned history list are earlier than this time, if it's not provided, we will return the number of recent entries

endTime

long

The returned history list are after this time. endTime timestamp should be before startTime

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/userTx/historyByTimeFrameWithPnl/all/{userAddress}'

getUserTxHistoryByChainAndPeriod

Get a list of transactions for a specific user for a specific period of time and a specific chain

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/historyByTimeFrame/{userAddress}

By using this end-point, please note that charges may be different depending on the amount of Tx that exists during the specified timeframe.

This end point can get you up to 100 Tx. If in specified time frame there are more than 20 transactions, the system will automatically create a new call to get all the Tx during this timeframe. For example, if there is 30 Tx (between startTime and endTime), the system will charge you 2 calls, if there are 55 Tx, the system will charge you 3 calls. The maximum you can be charged is 5 calls (to retrieve the 100 Tx)

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

chain*

string

Blockchain network

pageCount

integer

Page Count (maximum count is 20)

startTime

long

The returned history list are earlier than this time, if it's not provided, we will return the number of recent entries

endTime

long

The returned history list are after this time. endTime timestamp should be before startTime

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]
curl -X GET --header 'Accept: application/json'
 'https://api-v1.mymerlin.io/api/merlin/public/userTx/historyByTimeFrame/{userAddress}'
 

getUserTxHistoryByChainAndPeriodWithPnl

Get a list of transactions for a specific user for a specific period of time and a specific chain (including PNL)

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/historyByTimeFrameWithPnl/{userAddress}

By using this end-point, please note that charges may be different depending on the amount of Tx that exists during the specified timeframe.

This end point can get you up to 100 Tx. If in specified time frame there are more than 20 transactions, the system will automatically create a new call to get all the Tx during this timeframe. For example, if there is 30 Tx (between startTime and endTime), the system will charge you 2 calls, if there are 55 Tx, the system will charge you 3 calls. The maximum you can be charged is 5 calls (to retrieve the 100 Tx)

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

pageCount

integer

Page Count (maximum count is 20)

startTime

long

The returned history list are earlier than this time, if it's not provided, we will return the number of recent entries

chain*

string

Blockchain network

endTime

long

The returned history list are after this time. endTime timestamp should be before startTime

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/userTx/historyByTimeFrameWithPnl/{userAddress}'

getUserLastTxHistoryAll

Get the latest historical transactions for a specific user for specific hours

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/lastHistory/all/{userAddress}

By using this end-point, please note that charges may be different depending on the amount of Tx that happened during the specified last hours.

This end point can get you up to 100 Tx. If in the last specified hours there are more than 20 transactions the system will automatically create a new call to get all the Tx during this timeframe. For example if your "hour" request is 4 and there are 30 new Tx in the last 4 hours, the system will charge you 2 calls, if there are 55 new Tx, the system will charge you 3 calls. The maximum you can be charged is 5 calls (to retrieve the newest 100 Tx)

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

hours

long

How many hours

pageCount

integer

Page Count (maximum count is 100)

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]
curl -X GET --header 'Accept: application/json'
 'https://api-v1.mymerlin.io/api/merlin/public/userTx/lastHistory/all/{userAddress}'

getUserLastTxHistoryAllWithPnl

Get the latest historical transactions for a specific user for specific hours (including PNL)

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/lastHistoryWithPnl/all/{userAddress}

By using this end-point, please note that charges may be different depending on the amount of Tx that happened during the specified last hours.

This end point can get you up to 100 Tx. If in the last specified hours there are more than 20 transactions the system will automatically create a new call to get all the Tx during this timeframe. For example if your "hour" request is 4 and there are 30 new Tx in the last 4 hours, the system will charge you 2 calls, if there are 55 new Tx, the system will charge you 3 calls. The maximum you can be charged is 5 calls (to retrieve the newest 100 Tx)

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

hours*

long

How many hours

pageCount

integer

Page Count (maximum count is 100)

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]

curl -X GET --header 'Accept: application/json'
 'https://api-v1.mymerlin.io/api/merlin/public/userTx/lastHistoryWithPnl/all/{userAddress}'

getUserLastTxHistoryByChain

Get the latest historical transactions for a specific user for specific hours and chain

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/lastHistory/{userAddress}

By using this end-point, please note that charges may be different depending on the amount of Tx that happened during the specified last hours.

This end point can get you up to 100 Tx. If in the last specified hours there are more than 20 transactions the system will automatically create a new call to get all the Tx during this timeframe. For example if your "hour" request is 4 and there are 30 new Tx in the last 4 hours, the system will charge you 2 calls, if there are 55 new Tx, the system will charge you 3 calls. The maximum you can be charged is 5 calls (to retrieve the newest 100 Tx)

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

chain*

string

Chain name

hours*

long

How many hours

pageCount

integer

Page Count (maximum count is 100)

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]

curl -X GET --header 'Accept: application/json'
 'https://api-v1.mymerlin.io/api/merlin/public/userTx/lastHistory/{userAddress}

getUserLastTxHistoryByChainWithPnl

Get the latest historical transactions for a specific user for specific hours and chain (including PNL)

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/lastHistoryWithPnl/{userAddress}

By using this end-point, please note that charges may be different depending on the amount of Tx that happened during the specified last hours.

This end point can get you up to 100 Tx. If in the last specified hours there are more than 20 transactions the system will automatically create a new call to get all the Tx during this timeframe. For example if your "hour" request is 4 and there are 30 new Tx in the last 4 hours, the system will charge you 2 calls, if there are 55 new Tx, the system will charge you 3 calls. The maximum you can be charged is 5 calls (to retrieve the newest 100 Tx))

Path Parameters

NameTypeDescription

userAddress*

string

User wallet address

Query Parameters

NameTypeDescription

chain*

string

Chain name

hours*

long

How many hours

pageCount

integer

Page Count (maximum count is 100)

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/userTx/lastHistoryWithPnl/{userAddress}'

getUserTxForPositionWithPnl

Get all the transactions for a specific user and position in a protocol (including PNL)

GET https://api-v1.mymerlin.io/api/merlin/public/userTx/position/{userAddress}

Returns a position's related transactions, up to 100 related tx

Query Parameters

NameTypeDescription

position*

string

PositionId, retrieved value from DeFi Positions response field 'yieldAndPnl' > 'id'

[
  {
    "active": true,
    "balances": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenAddress": "string",
        "tokenDecimals": 0,
        "tokenLogo": "string",
        "tokenName": "string",
        "tokenSymbol": "string"
      }
    ],
    "block": 0,
    "chain": "string",
    "from": "string",
    "hash": "string",
    "id": "string",
    "order": 0,
    "pnlUsd": 0,
    "positionYield": {
      "balance": 0,
      "balanceUSD": 0,
      "tokenDecimals": 0,
      "tokenSymbol": "string"
    },
    "protocol": "string",
    "timeStamp": 0,
    "to": "string",
    "txFee": 0,
    "txFeeUsd": 0,
    "txType": "string",
    "yieldUSD": 0,
    "yields": [
      {
        "balance": 0,
        "balanceUSD": 0,
        "tokenDecimals": 0,
        "tokenSymbol": "string"
      }
    ]
  }
]
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/userTx/position/
?position={position}'

Last updated