{
  "openapi": "3.0.3",
  "info": {
    "title": "FastNEAR API - V1 Account Full",
    "version": "3.0.3",
    "description": "Fetch the combined indexed account view, including staking pools, FT balances, NFTs, and account state."
  },
  "paths": {
    "/v1/account/{account_id}/full": {
      "get": {
        "description": "Fetch the combined indexed account view, including staking pools, FT balances, NFTs, and account state.",
        "operationId": "account_full_v1",
        "parameters": [
          {
            "description": "NEAR account ID to inspect.",
            "example": "here.tg",
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "account_id": "here.tg",
                  "nfts": [],
                  "pools": [],
                  "state": {
                    "balance": "1000000000000000000000000",
                    "locked": "0",
                    "storage_bytes": 512
                  },
                  "tokens": []
                },
                "schema": {
                  "$ref": "#/components/schemas/AccountFullResponse"
                }
              }
            },
            "description": "Full indexed account information for the requested account"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "text/plain": {
                "example": "Invalid API key",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "The supplied API key was not recognized."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Lookup full indexed account information",
        "tags": [
          "accounts"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Mainnet",
      "url": "https://api.fastnear.com"
    },
    {
      "description": "Testnet",
      "url": "https://test.api.fastnear.com"
    }
  ],
  "security": [
    {},
    {
      "BearerAuth": []
    },
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "schemas": {
      "AccountFullResponse": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "type": "string"
          },
          "nfts": {
            "items": {
              "$ref": "#/components/schemas/NftRow"
            },
            "type": "array"
          },
          "pools": {
            "items": {
              "$ref": "#/components/schemas/PoolRow"
            },
            "type": "array"
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AccountStateResponse"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "tokens": {
            "items": {
              "$ref": "#/components/schemas/TokenRow"
            },
            "type": "array"
          }
        },
        "required": [
          "account_id",
          "pools",
          "tokens",
          "nfts",
          "state"
        ],
        "type": "object"
      },
      "AccountStateResponse": {
        "additionalProperties": false,
        "properties": {
          "balance": {
            "nullable": true,
            "type": "string"
          },
          "locked": {
            "nullable": true,
            "type": "string"
          },
          "storage_bytes": {
            "format": "uint64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "balance",
          "locked",
          "storage_bytes"
        ],
        "type": "object"
      },
      "NftRow": {
        "additionalProperties": false,
        "properties": {
          "contract_id": {
            "type": "string"
          },
          "last_update_block_height": {
            "format": "uint64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "contract_id",
          "last_update_block_height"
        ],
        "type": "object"
      },
      "PoolRow": {
        "additionalProperties": false,
        "properties": {
          "last_update_block_height": {
            "format": "uint64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "pool_id": {
            "type": "string"
          }
        },
        "required": [
          "pool_id",
          "last_update_block_height"
        ],
        "type": "object"
      },
      "TokenRow": {
        "additionalProperties": false,
        "properties": {
          "balance": {
            "nullable": true,
            "type": "string"
          },
          "contract_id": {
            "type": "string"
          },
          "last_update_block_height": {
            "format": "uint64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "contract_id",
          "last_update_block_height",
          "balance"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "description": "FastNEAR API key as the `apiKey` query parameter. Handy for curl or clients that cannot set headers, but the key can end up in URLs, logs, and shell history.",
        "in": "query",
        "name": "apiKey",
        "type": "apiKey"
      },
      "BearerAuth": {
        "description": "FastNEAR API key as an `Authorization: Bearer` header. Preferred for backends, workers, and proxies because it keeps the key out of URLs and logs.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
