Get Position Events
curl --request GET \
--url https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"token_id": "119128",
"chain_id": 130,
"deposits": [
{
"amount0": "378.12",
"amount1": "15.88",
"token0PriceUSD": "1.00",
"token1PriceUSD": "60.04",
"timestamp": 1717200000,
"block": 18000000,
"transaction_hash": "0xabc"
}
],
"withdrawals": [],
"collections": []
},
"request_id": "req_..."
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "page must be a positive integer.",
"request_id": "req_..."
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Missing API key.",
"request_id": "req_..."
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient API credits.",
"request_id": "req_..."
}
}{
"error": {
"code": "ACCOUNT_SUSPENDED",
"message": "This organization is suspended.",
"request_id": "req_..."
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_..."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"request_id": "req_..."
}
}Get Position Events
Position history for one LP position: deposits (IncreaseLiquidity), withdrawals (DecreaseLiquidity), fee collections, and compounds (Collect). Each event has token amounts, token prices at the transaction (token0PriceUSD, token1PriceUSD), timestamp, and transaction_hash. USD value is amount times that price; it is not a stored field. The first deposit is the mint. An empty compounds list is omitted.
Credits: 1 per successful call.
GET
https://api.defiorbit.xyz
/
v1
/
positions
/
uniswapv3
/
{id}
/
events
Get Position Events
curl --request GET \
--url https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.defiorbit.xyz/v1/positions/uniswapv3/{id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"token_id": "119128",
"chain_id": 130,
"deposits": [
{
"amount0": "378.12",
"amount1": "15.88",
"token0PriceUSD": "1.00",
"token1PriceUSD": "60.04",
"timestamp": 1717200000,
"block": 18000000,
"transaction_hash": "0xabc"
}
],
"withdrawals": [],
"collections": []
},
"request_id": "req_..."
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "page must be a positive integer.",
"request_id": "req_..."
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Missing API key.",
"request_id": "req_..."
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient API credits.",
"request_id": "req_..."
}
}{
"error": {
"code": "ACCOUNT_SUSPENDED",
"message": "This organization is suspended.",
"request_id": "req_..."
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_..."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"request_id": "req_..."
}
}Authorizations
Path Parameters
Token ID.
Example:
"119128"