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

# Skills

> How to organize reusable strategy skills in Aionmarket agent workflows

Skills are reusable strategy modules you attach to your agent runtime. In Aionmarket, a skill is usually a code module plus config that drives market selection, risk checks, and execution behavior.

## What a skill contains

A practical skill package usually includes:

* Strategy logic (signal generation)
* Risk policy (position sizing and stop conditions)
* Execution adapter (maps decisions to `POST /markets/trade`)
* Metadata (name, version, owner, schedule)

## Aionmarket skills model

In current Aionmarket `bvapi`, strategy orchestration is application-side:

* You manage skill source code and schedule in your own service.
* API interactions happen through standard endpoints like `/markets`, `/markets/context/{id}`, `/markets/trade`, `/markets/briefing`.

## Recommended lifecycle

1. Design skill objective and constraints.
2. Backtest or dry-run on low size.
3. Roll out with strict settings limits.
4. Monitor via heartbeat loop and briefing checks.
5. Iterate version-by-version.

## Minimal skill interface (example)

```python theme={null}
def run_skill(client, config):
    markets = client.get_markets(q=config["query"], limit=10)
    for m in markets:
        ctx = client.get_market_context(m["id"], user=config["wallet"])
        if ctx.get("warnings"):
            continue
        # decide and trade
```

## Endpoint mapping reference

* Search: `GET /markets`
* Context: `GET /markets/context/{id}`
* Briefing: `GET /markets/briefing`
* Trade: `POST /markets/trade`
* Positions: `GET /markets/current-positions`
