> ## Documentation Index
> Fetch the complete documentation index at: https://docs.odin.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Get user activity



## OpenAPI

````yaml get /user/{principal}/activity
openapi: 3.0.0
info:
  title: Odin API
  description: The Odin API documentation
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /user/{principal}/activity:
    get:
      tags:
        - Users
      operationId: UserController_activity
      parameters:
        - name: principal
          required: true
          in: path
          schema:
            type: string
        - name: page
          required: false
          in: query
          schema:
            type: number
        - name: limit
          required: false
          in: query
          schema:
            type: number
        - name: user
          required: false
          in: query
          schema:
            type: string
        - name: token
          required: false
          in: query
          schema:
            type: string
        - name: action
          required: false
          in: query
          schema:
            enum:
              - buy
              - sell
              - add
              - remove
              - withdraw
              - deposit
              - transfer
              - create
              - send
              - receive
            type: string
        - name: action_in
          required: false
          in: query
          schema:
            type: array
            items:
              enum:
                - buy
                - sell
                - add
                - remove
                - withdraw
                - deposit
                - transfer
                - create
                - send
                - receive
              type: string
        - name: time_min
          required: false
          in: query
          schema:
            type: string
        - name: time_max
          required: false
          in: query
          schema:
            type: string
        - name: amount_btc_max
          required: false
          in: query
          schema:
            type: string
        - name: amount_btc_min
          required: false
          in: query
          schema:
            type: string
        - name: amount_token_max
          required: false
          in: query
          schema:
            type: string
        - name: amount_token_min
          required: false
          in: query
          schema:
            type: string
        - name: sort
          required: false
          in: query
          schema:
            nullable: true
            enum:
              - null
              - time:asc
              - time:desc
              - amount_btc:asc
              - amount_btc:desc
              - amount_token:asc
              - amount_token:desc
            type: string
        - name: search
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Paginated'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/UserActivityEntity'
components:
  schemas:
    Paginated:
      type: object
      properties:
        data:
          type: array
          items:
            type: string
        count:
          type: number
        page:
          type: number
        limit:
          type: number
      required:
        - data
        - count
        - page
        - limit
    UserActivityEntity:
      type: object
      properties:
        id:
          type: string
        time:
          format: date-time
          type: string
        action:
          allOf:
            - $ref: '#/components/schemas/ActivityAction'
        amount_token:
          type: number
          format: decimal
        amount_btc:
          format: int64
          type: integer
        description:
          $ref: '#/components/schemas/Function'
        token:
          $ref: '#/components/schemas/UserActivityTokenEntity'
        rel_token:
          $ref: '#/components/schemas/TokenEntity'
      required:
        - time
        - action
        - amount_token
        - amount_btc
        - description
    ActivityAction:
      type: number
    Function:
      type: object
      properties: {}
    UserActivityTokenEntity:
      type: object
      properties:
        id:
          type: string
        ticker:
          type: string
        rune:
          type: string
        name:
          type: string
        image:
          type: string
        divisibility:
          type: number
        decimals:
          type: number
        trading:
          type: boolean
        deposits:
          type: boolean
        withdrawals:
          type: boolean
        rune_id:
          type: string
      required:
        - id
        - ticker
        - rune
        - name
        - image
        - divisibility
        - decimals
        - trading
        - deposits
        - withdrawals
        - rune_id
    TokenEntity:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        image:
          type: string
        creator:
          type: string
        created_time:
          type: string
        volume:
          type: number
        bonded:
          type: boolean
        icrc_ledger:
          type: string
        price:
          type: number
        marketcap:
          type: number
        rune:
          type: string
        featured:
          type: boolean
        holder_count:
          type: number
        comment_count:
          type: number
        sold:
          type: number
        twitter:
          type: string
        website:
          type: string
        telegram:
          type: string
        last_comment_time:
          type: string
        rel_ledgers:
          type: array
          items:
            $ref: '#/components/schemas/LedgerEntity'
        buy_count:
          type: number
        sell_count:
          type: number
        ticker:
          type: string
        btc_liquidity:
          format: int64
          type: integer
        user_btc_liquidity:
          format: int64
          type: integer
        user_token_liquidity:
          type: number
          format: decimal
        user_lp_tokens:
          type: number
          format: decimal
        token_liquidity:
          type: number
          format: decimal
        total_supply:
          type: number
          format: decimal
        swap_fees:
          format: int64
          type: integer
        swap_volume:
          format: int64
          type: integer
        swap_fees_24:
          format: int64
          type: integer
        threshold:
          type: number
          format: decimal
        swap_volume_24:
          format: int64
          type: integer
        holder_dev:
          type: number
          format: decimal
        holder_top:
          type: number
          format: decimal
        txn_count:
          format: int64
          type: integer
        decimals:
          type: number
        deposits:
          type: boolean
        divisibility:
          type: number
        external:
          type: boolean
        trading:
          type: boolean
        withdrawals:
          type: boolean
        last_action_time:
          format: date-time
          type: string
        price_5m:
          format: int64
          type: integer
        price_1h:
          format: int64
          type: integer
        price_6h:
          format: int64
          type: integer
        price_1d:
          format: int64
          type: integer
        rune_id:
          type: string
        twitter_verified:
          type: boolean
        rel_tags:
          type: array
          items:
            $ref: '#/components/schemas/TagEntity'
        tags:
          $ref: '#/components/schemas/Function'
        verified:
          type: boolean
        liquidity_threshold:
          format: int64
          type: integer
        progress:
          type: number
      required:
        - id
        - name
        - created_time
        - volume
        - bonded
        - price
        - marketcap
        - featured
        - holder_count
        - comment_count
        - sold
        - rel_ledgers
        - buy_count
        - sell_count
        - ticker
        - btc_liquidity
        - user_btc_liquidity
        - user_token_liquidity
        - user_lp_tokens
        - token_liquidity
        - total_supply
        - swap_fees
        - swap_volume
        - swap_fees_24
        - threshold
        - swap_volume_24
        - holder_dev
        - holder_top
        - txn_count
        - decimals
        - deposits
        - divisibility
        - external
        - trading
        - withdrawals
        - last_action_time
        - price_5m
        - price_1h
        - price_6h
        - price_1d
        - rune_id
        - twitter_verified
        - rel_tags
        - tags
        - verified
        - liquidity_threshold
        - progress
    LedgerEntity:
      type: object
      properties:
        user:
          type: string
        token:
          type: string
        balance:
          type: number
          format: decimal
        user_username:
          type: string
        user_image:
          type: string
        tokenid:
          type: string
      required:
        - user
        - token
        - balance
        - user_username
        - user_image
        - tokenid
    TagEntity:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
        description:
          type: string
        created_time:
          type: string
      required:
        - id
        - name
        - created_time

````