Wallet deals

Request cost: 1 credits

get

Returns wallet deals. When the from_time or to_time fields are specified, deals will be filtered and recalculated for the given time range.

Authorizations
Path parameters
addressstringRequired

Wallet address

Example: 0x199...
Query parameters
networkstring Β· enumRequired

Supported blockchain networks

Example: ethPossible values:
pageinteger Β· min: 1Optional

Page number for pagination

Default: 1Example: 1
per_pageinteger Β· min: 1 Β· max: 150Optional

Number of items to return per page

Default: 30Example: 30
searchstring Β· max: 128Optional

Search string. Searches by partial token name, complete symbol, or full token address. Case-insensitive.

Example: DOGE
from_timeinteger | number Β· min: 1Optional

Timestamp in seconds. Minimum time for the deal's first trade. Deals started before this time will be excluded from result and calculations.

Example: 1609459200
to_timeinteger | number Β· min: 1Optional

Timestamp in seconds. Maximum time for deal trades. Trades executed after this time will be excluded from result and calculations.

Example: 1893456000
Responses
200
Successful response
application/json
get
GET /api/analytics/v1/wallets/{address}/deals HTTP/1.1
Host: definest.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "result": {
    "deals": [
      {
        "id": 1,
        "network": "eth",
        "token": {
          "network": "eth",
          "address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
          "name": "Wrapped BTC",
          "symbol": "WBTC",
          "scam_status": "ok",
          "created_at": 1710230321,
          "started_at": 1738303112
        },
        "open_time": {
          "initial": 1738303428,
          "following": 1738303428
        },
        "last_operation_time": {
          "initial": 1738303428,
          "following": 1738303428
        },
        "status": {
          "initial": "open",
          "following": "open"
        },
        "trades_number": {
          "initial": 1,
          "following": 1
        },
        "closed_position": {
          "initial": 50,
          "following": 50
        },
        "pnl_realized": {
          "initial": 10,
          "following": 9
        },
        "pnl_unrealized": {
          "initial": 10,
          "following": 9
        },
        "pnl_total": {
          "initial": 10,
          "following": 9
        },
        "roi_realized": {
          "initial": 10,
          "following": 9
        },
        "roi_unrealized": {
          "initial": 10,
          "following": 9
        },
        "roi_total": {
          "initial": 10,
          "following": 9
        },
        "roi_low": {
          "initial": 10,
          "following": 9
        },
        "roi_high": {
          "initial": 10,
          "following": 9
        },
        "investment_amount": {
          "initial": 10,
          "following": 9
        },
        "pools": [
          {
            "type": "uniswap_v2",
            "address": "0x7FBa4B8Dc5E7616e59622806932DBea72537A56b",
            "name": "Uniswap V2"
          }
        ],
        "trades": [
          {
            "id": 1,
            "is_following": true,
            "type": "buy",
            "transaction_hash": "0xb1...",
            "application": {
              "name": "Uniswap V2",
              "address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
            },
            "usd_amount": 100,
            "quantity": 2000,
            "quantity_unlimited": true,
            "usd_price": 0.15,
            "usd_liquidity": 10000,
            "coin_lifetime": 5,
            "time": 1738303428,
            "pools": [
              {
                "type": "uniswap_v2",
                "address": "0x7FBa4B8Dc5E7616e59622806932DBea72537A56b",
                "name": "Uniswap V2"
              }
            ],
            "coin_fee": {
              "amount": 10,
              "percent": 0.5
            },
            "router_fee": {
              "usd": 100,
              "native": 0.1
            },
            "network_fee": {
              "usd": 100,
              "native": 0.1
            },
            "swaps": [
              {
                "from": {
                  "amount": 10,
                  "symbol": "WBTC",
                  "address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
                },
                "to": {
                  "amount": 20,
                  "symbol": "WBTC",
                  "address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
                },
                "pool": {
                  "type": "uniswap_v2",
                  "address": "0x7FBa4B8Dc5E7616e59622806932DBea72537A56b",
                  "name": "Uniswap V2"
                },
                "usd_price": 0.15
              }
            ]
          }
        ]
      }
    ],
    "page": {
      "current": 1,
      "per_page": 100
    }
  },
  "credits": {
    "spent": 1,
    "remaining": 1000
  }
}

Last updated