Xpersona
F

Finam

CLAWHUB · Unverified

Execute trades, manage portfolios, access real-time market data, browse and search market assets, scan volatility, and answer questions about Finam Trade API Skill: Finam Owner: alexander-panov Summary: Execute trades, manage portfolios, access real-time market data, browse and search market assets, scan volatility, and answer questions about Finam Trade API Tags: latest:1.0.4 Version history: v1.0.4 | 2026-04-15T08:08:37.353Z | user - Fixed parameter and field names in API query examples for consistency (e.g., accountId → account_id, limitPrice → limit_price, startTime →

62
Rank
84
Safety
2.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 2K downloads reported by the source. Last updated 10/9/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s172ce6k3w8es732hcfapyqa1x83kc5d:finam
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-alexander-panov-finam/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

149,309 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: finam
description: Execute trades, manage portfolios, access real-time market data, browse and search market assets, scan volatility, and answer questions about Finam Trade API
metadata: '{"openclaw": {"emoji": "📈", "homepage": "https://tradeapi.finam.ru/", "requires": {"bins": ["curl", "jq", "python3"], "env": ["FINAM_API_KEY", "FINAM_ACCOUNT_ID"]}}}'
---

# Finam Trade API Skill

## Setup

**Prerequisites:** `$FINAM_API_KEY` and `$FINAM_ACCOUNT_ID` must be already set in your environment.

If not configured by environment, follow these steps:

1. Register and obtain your API Key from [tokens page](https://tradeapi.finam.ru/docs/tokens)
2. Obtain your Account ID from your [Finam account dashboard](https://lk.finam.ru/)
3. Set environment variables:

```shell
export FINAM_API_KEY="your_api_key_here"
export FINAM_ACCOUNT_ID="your_account_id_here"
```

Obtain JWT token before using the API:

```shell
export FINAM_JWT_TOKEN=$(curl -sL "https://api.finam.ru/v1/sessions" \
--header "Content-Type: application/json" \
--data '{"secret": "'"$FINAM_API_KEY"'"}' | jq -r '.token')
```

**Note:** Token expires after 15 minutes. Re-run this command if you receive authentication errors.

## Market assets

### List Available Exchanges and Equities

**Symbol Format:** All symbols must be in `ticker@mic` format (e.g., `SBER@MISX`)
**Base MIC Codes:**

- `MISX` - Moscow Exchange
- `RUSX` - RTS
- `XNGS` - NASDAQ/NGS
- `XNMS` - NASDAQ/NNS
- `XNYS` - New York Stock Exchange

View all supported exchanges with their MIC codes:

```shell
jq -r '.exchanges[] | "\(.mic) - \(.name)"' assets/exchanges.json
```

List stocks available on a specific exchange:

```shell
MIC="MISX"
LIMIT=20
jq -r ".$MIC[:$LIMIT] | .[] | \"\(.symbol) - \(.name)\"" assets/equities.json
```

### Get Asset Specification

Fetch detailed specification for a specific instrument (lot size, price step, decimals, trading schedule, etc.):

```shell
SYMBOL="SBER@MISX"
curl -sL "https://api.finam.ru/v1/assets/$SYMBOL?account_id=$FINAM_ACCOUNT_ID" \
  --header "Authorization: $FINAM_JWT_TOKEN" | jq
```

`account_id` is optional but recommended — returns account-specific fields (margin, available quantity, etc.).

### Search Assets

Search instruments by ticker glob pattern and/or name substring:

```shell
# By ticker glob
python3 scripts/asset_search.py 'SBER*'

# By name (case-insensitive substring)
python3 scripts/asset_search.py --name 'apple'

# By ticker glob + type filter
python3 scripts/asset_search.py 'NG*' --type FUTURES

# Search across all instruments (including archived) via /assets/all
python3 scripts/asset_search.py 'NG*' --type FUTURES --active false
```

Available types: `EQUITIES`, `FUTURES`, `BONDS`, `FUNDS`, `SPREADS`, `OTHER`, `CURRENCIES`, `OPTIONS`, `SWAPS`, `INDICES`

`--max=N` switches to `GET /v1/assets/all` with pagination (rate limit: 200 req/min). `--active false` includes archived instruments.

### Get Top N Stocks by Volume

Pre-ranked lists of the 100 most liquid equi

_meta.json

{
  "ownerId": "kn71eeh3y9b0de9h8t6z1yvah1819ar5",
  "slug": "finam",
  "version": "1.0.4",
  "publishedAt": 1776240517353
}

references/GRPC.md

# Finam Trade API — gRPC (FinamPy)

Библиотека-обёртка [FinamPy](https://github.com/cia76/FinamPy) для работы с [Finam Trade API](https://tradeapi.finam.ru) v2.13.0 из Python по протоколу gRPC.

---

## Установка

```bash
pip install git+https://github.com/cia76/FinamPy.git
```

При первом запуске передать токен явно (сохраняется в системное хранилище):

```python
import os
from FinamPy import FinamPy
fp_provider = FinamPy(os.environ["FINAM_API_KEY"])
```

Последующие вызовы — без токена:

```python
fp_provider = FinamPy()
```

---

## Подключение и базовое использование

```python
from FinamPy import FinamPy

fp_provider = FinamPy()

# Синхронный вызов метода — возвращает ответ или None при ошибке
response = fp_provider.call_function(stub.Method, RequestMessage(...))

# Закрыть канал перед выходом
fp_provider.close_channel()
```

**Свойства провайдера:**

| Свойство | Тип | Описание |
|---|---|---|
| `account_ids` | `list[str]` | Список ID торговых счетов |
| `tz_msk` | `tzinfo` | Часовой пояс МСК (UTC+3) |
| `min_history_date` | `datetime` | Минимальная дата истории баров |

---

## Форматы данных

### Символы

FinamPy использует два формата:

| Формат | Пример | Где используется |
|---|---|---|
| `{board}.{ticker}` (dataname) | `TQBR.SBER`, `SPBFUT.SiH5` | Человекочитаемый ввод |
| `{ticker}@{mic}` (symbol) | `SBER@MISX`, `Si@ROFX` | Все запросы к API |

Конвертация dataname → symbol:

```python
finam_board, ticker = fp_provider.dataname_to_finam_board_ticker('TQBR.SBER')
mic = fp_provider.get_mic(finam_board, ticker)
symbol = f'{ticker}@{mic}'  # → 'SBER@MISX'
```

**MIC-коды основных бирж:**

| MIC | Биржа |
|---|---|
| `MISX` | Московская биржа (акции) |
| `ROFX` | Московская биржа (фьючерсы) |
| `RUSX` | РТС |
| `XNGS` | NASDAQ/NGS |
| `XNYS` | NYSE |

### Таймфреймы

| FinamPy `tf` | Описание | Аналог REST |
|---|---|---|
| `M1` | 1 минута | `TIME_FRAME_M1` |
| `M5` | 5 минут | `TIME_FRAME_M5` |
| `M15` | 15 минут | `TIME_FRAME_M15` |
| `M30` | 30 минут | `TIME_FRAME_M30` |
| `H1` | 1 час | `TIME_FRAME_H1` |
| `H2` | 2 часа | `TIME_FRAME_H2` |
| `H4` | 4 часа | `TIME_FRAME_H4` |
| `D1` | День | `TIME_FRAME_D` |
| `W1` | Неделя | `TIME_FRAME_W` |
| `MN1` | Месяц | `TIME_FRAME_MN` |

Конвертация:

```python
finam_tf, tf_range, intraday = fp_provider.timeframe_to_finam_timeframe('D1')
# finam_tf   — константа для запроса к API
# tf_range   — timedelta максимального диапазона одного запроса
# intraday   — True для внутридневных таймфреймов
```

### Цены и объёмы (Decimal / nanos)

```python
from google.type.decimal_pb2 import Decimal

# Запись цены в запрос
price = Decimal(value='310.50')

# Чтение цены из ответа
price_float = float(response.price.value)

# Чтение денег из поля units + nanos
amount = round(cash.units + cash.nanos * 1e-9, 2)
```

### Временны́е метки (Timestamp)

```python
from datetime import datetime
from google.protobuf.timestamp_pb2 import Timestamp

# datetime → Timestamp
ts = Timestamp(seconds=int(datetime.timestamp(dt))

references/REST.md

# Finam Trade-API REST

API для торговых операций

**Server:** https://api.finam.ru

---

## AccountsService

- [GET /v1/accounts/{accountId}](#получение-информации-по-конкретному-аккаунту)
- [GET /v1/accounts/{accountId}/trades](#получение-истории-по-сделкам-аккаунта)
- [GET /v1/accounts/{accountId}/transactions](#получение-списка-транзакций-аккаунта)

---

### Получение информации по конкретному аккаунту

`GET /v1/accounts/{accountId}`

**Path Parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| accountId | string | yes | Идентификатор аккаунта |

**Responses**

| Code | Description |
| --- | --- |
| 200 | Успешный ответ |
| 401 | Срок действия токена истек или токен недействителен |
| 404 | Счёт не был найден в токене |
| 429 | Слишком много запросов. Доступный лимит - 200 запросов в минуту |
| 500 | Внутренняя ошибка сервиса. Попробуйте позже |
| 503 | Сервис на данный момент не доступен. Попробуйте позже |
| 504 | Крайний срок истек до завершения операции |
| default | Непредвиденная ошибка |

**Request Example**

```curl
curl 'https://api.finam.ru/v1/accounts/{accountId}' \
  --header 'Authorization: YOUR_SECRET_TOKEN'
```

**Response Schema (200)**

```json
{
  "accountId": "string",
  "type": "string",
  "status": "string",
  "equity": {
    "value": "string"
  },
  "unrealizedProfit": {
    "value": "string"
  },
  "positions": [
    {
      "symbol": "string",
      "quantity": {
        "value": "string"
      },
      "averagePrice": {
        "value": "string"
      },
      "currentPrice": {
        "value": "string"
      },
      "maintenanceMargin": {
        "value": "string"
      },
      "dailyPnl": {
        "value": "string"
      },
      "unrealizedPnl": {
        "value": "string"
      }
    }
  ],
  "cash": [
    {
      "currencyCode": "string",
      "units": "string",
      "nanos": 1
    }
  ],
  "portfolioMc": {
    "availableCash": {
      "value": "string"
    },
    "initialMargin": {
      "value": "string"
    },
    "maintenanceMargin": {
      "value": "string"
    }
  },
  "portfolioMct": {},
  "portfolioForts": {
    "availableCash": {
      "value": "string"
    },
    "moneyReserved": {
      "value": "string"
    }
  },
  "openAccountDate": "2026-03-27T13:09:52.291Z",
  "firstTradeDate": "2026-03-27T13:09:52.291Z",
  "firstNonTradeDate": "2026-03-27T13:09:52.291Z"
}
```

---

### Получение истории по сделкам аккаунта

`GET /v1/accounts/{accountId}/trades`

Параметры:
- `accountId` — передается в URL пути
- `limit` и `interval` — передаются как query-параметры

**Path Parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| accountId | string | yes | Идентификатор аккаунта |

**Query Parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| limit | integer (int32) | no | Лимит количества сделок |
| interval.start_time | string (date-time) | no | Inclusive start of the interval. If specified, a Timestamp matching this interv

skill-card.md

## Description:

Execute trades, manage portfolios, access real-time market data, browse and search market assets, scan volatility, and answer questions about Finam Trade API.

This skill is ready for commercial/non-commercial use.

## Publisher:

[alexander-panov](https://clawhub.ai/user/alexander-panov)

### License/Terms of Use:

MIT-0

## Use Case:

Developers, trading operators, and analysts use this skill to interact with the Finam Trade API for market data, portfolio checks, asset discovery, volatility scans, and user-confirmed order workflows.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill can place or cancel live brokerage orders.

Mitigation: Require explicit user confirmation of symbol, side, quantity, order type, and price before any order or cancellation.

Risk: Finam credentials and JWTs can expose access to a real brokerage account.

Mitigation: Use the least-privileged API key available and keep FINAM_API_KEY, FINAM_ACCOUNT_ID, and FINAM_JWT_TOKEN out of logs and chat transcripts.

Risk: The gRPC workflow installs FinamPy from an unpinned Git URL.

Mitigation: Pin and review the FinamPy dependency before enabling the gRPC workflow.

Risk: Live market data, account data, and volatility scans may be incomplete, stale, rate-limited, or unavailable.

Mitigation: Treat outputs as decision-support information and verify account state, prices, and orders with Finam before acting.

## Reference(s):

- [Finam Trade API](https://tradeapi.finam.ru/)
- [REST Reference](references/REST.md)
- [gRPC Python Reference](references/GRPC.md)
- [Finam API Token Documentation](https://tradeapi.finam.ru/docs/tokens)
- [Finam Skill on ClawHub](https://clawhub.ai/alexander-panov/skills/finam)

## Skill Output:

**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, API calls, Guidance]

**Output Format:** [Markdown with shell and Python code blocks plus JSON API responses]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Requires Finam credentials for live API workflows and can produce commands that interact with brokerage account data or orders.]

## Skill Version(s):

1.0.4 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Finam and adjacent AI workflows.