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

# Obter usuário atual

> Consultar a conta autenticada

Retorna as informações da conta do usuário autenticado, incluindo saldo, limite de crédito, exposição atual, formato de odds padrão e flags de acesso.

## Requisição

`GET /user/getMe`

Este endpoint não recebe parâmetros. É necessária autenticação (consulte [Autenticação](https://docs.4casters.io/pt-BR/pages/rest/authentication.md)).

```bash curl theme={null}
curl https://api.4casters.io/user/getMe \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Resposta

**data** `object`

**data**

**user** `object`

**user**

**id** `string`

Id de usuário.

**username** `string`

Nome de usuário da conta.

**type** `string`

Tipo de conta — `free`, `p2p`, `marketmaker` ou `agent`.

**oddsFormat** `string`

Formato de odds padrão. `american` ou `decimal`.

**displayBalance** `number`

Saldo atual (valor de exibição).

**creditLimit** `number`

Limite de crédito (negativo em contas de crédito).

**liability** `number`

Exposição aberta atual em todos os eventos.

**commissionCharged** `number`

Taxa de comissão cobrada desta conta.

**maxLiability** `number`

Teto de exposição no nível da conta.

**isAdmin** `boolean`

**isPro** `boolean`

**isDeposit** `boolean`

**isAlphaUser** `boolean`

**defaultExpiry** `integer`

Expiração de ordem padrão, em minutos. `null` para "sem valor padrão".

**defaultOffer** `number`

Tamanho de oferta padrão ao enviar ordens.

**sportsbookDefault** `boolean`

**sportsbookMinimumDisplay** `number`

**defaultRotationNumbers** `boolean`

**displayRotationNumbers** `boolean`

**viewOddsWithCommission** `boolean`

**defaultSendOrderMessage** `boolean`

**showChatLastMessage** `boolean`

**yesNoSummary** `boolean`

**accessCode** `string`

Código de cadastro da conta.

**p2pCode** `string`

Se for uma conta de agente P2P, o código que os referidos dela usam ao se cadastrar.

**createdAt** `string`

Marca de tempo ISO 8601 de criação da conta.

**emailConfirmation** `boolean`

Se o email da conta está confirmado.

### Exemplo

```json JSON theme={null}
{
  "data": {
    "user": {
      "id": "5fe37acbb5a23600123662c1",
      "username": "your_username",
      "type": "p2p",
      "oddsFormat": "american",
      "displayBalance": 1250.50,
      "creditLimit": 500,
      "liability": -125.00,
      "commissionCharged": 0.01,
      "isAdmin": false,
      "isPro": false,
      "createdAt": "2020-12-23T17:14:09.000Z",
      "emailConfirmation": true
    }
  }
}
```


## OpenAPI

````yaml GET /user/getMe
openapi: 3.1.0
info:
  title: 4casters REST API
  version: 1.0.0
  description: >-
    Public REST API for the 4casters peer-to-peer betting exchange. Use this API
    to manage your account, query the orderbook and games, and place / edit /
    cancel orders.


    All responses (unless noted otherwise) are JSON envelopes of the form `{
    "data": ... }`.
  contact:
    name: 4casters
    url: https://4casters.io
servers:
  - url: https://api.4casters.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Login and account session management
  - name: User
    description: Read account info, bets, and orders
  - name: Orders
    description: Place, edit, look up, and cancel orders
  - name: Markets
    description: Browse leagues, games, participants, and orderbooks
  - name: Affiliate
    description: Affiliate / referral commission
paths:
  /user/getMe:
    get:
      tags:
        - User
      summary: Get current user
      description: >-
        Return the currently-authenticated user's account information including
        balance, credit limit, current liability, default odds format, and
        access flags.
      responses:
        '200':
          description: Current user info
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      user:
                        $ref: '#/components/schemas/User'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: string
          description: User id.
        username:
          type: string
        type:
          $ref: '#/components/schemas/UserType'
        oddsFormat:
          $ref: '#/components/schemas/OddsFormat'
        displayBalance:
          type: number
          description: Current balance (display value).
        creditLimit:
          type: number
          description: Credit limit (negative for credit accounts).
        liability:
          type: number
          description: Current open liability across all games.
        commissionCharged:
          type: number
          description: Commission rate charged to this account.
        maxLiability:
          type: number
          description: Account-level cap on liability.
        matchedVolume:
          type: object
          description: Account preferences for displaying matched volume.
        openInterest:
          type: object
          description: Account preferences for displaying open interest.
        isAdmin:
          type: boolean
        isPro:
          type: boolean
        isDeposit:
          type: boolean
        isAlphaUser:
          type: boolean
        sportsbookDefault:
          type: boolean
        defaultRotationNumbers:
          type: boolean
        displayRotationNumbers:
          type: boolean
        viewOddsWithCommission:
          type: boolean
        defaultExpiry:
          type: integer
          nullable: true
          description: Default order expiry, in minutes.
        defaultOffer:
          type: number
          nullable: true
          description: Default offer size when placing orders.
        defaultSendOrderMessage:
          type: boolean
        sportsbookMinimumDisplay:
          type: number
        showChatLastMessage:
          type: boolean
        yesNoSummary:
          type: boolean
        accessCode:
          type: string
          nullable: true
        code:
          type: string
          nullable: true
        p2pCode:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        emailConfirmation:
          type: boolean
    UserType:
      type: string
      enum:
        - free
        - p2p
        - marketmaker
        - agent
      description: Account type.
    OddsFormat:
      type: string
      enum:
        - american
        - decimal
  responses:
    Unauthorized:
      description: Missing or invalid auth token
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Pass your auth token in the `Authorization` header. The `Bearer` prefix
        is optional; the server also accepts a signed `auth` cookie or a `token`
        field in the request body.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.