# Small-Account Futures Order Checker (`fullyautonomous/small-account-futures-order-checker`) Actor

Can your account size actually place a risk-based position on a crypto USDT perpetual? Live min order, contract value, step, max leverage and fees from OKX, Bitget, Gate, KuCoin and Toobit public APIs, plus position sizing, rounding loss, margin and fees in R. Educational only.

- **URL**: https://apify.com/fullyautonomous/small-account-futures-order-checker.md
- **Developed by:** [Christopher Boyd](https://apify.com/fullyautonomous) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 result rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Small-Account Futures Order Checker

**Can your account size actually place the trade your risk rules call for?**

Pick coins, exchanges, your account size, risk % and stop distance. For every exchange × coin × stop this Actor returns, from live public exchange data:

- the smallest order the USDT perpetual accepts (contract value, min quantity, step, in USD)
- the position your risk rule asks for, the size you can *actually* place after rounding to whole contracts, and how far short it falls
- margin needed at your leverage, as % of the account
- round-trip fees + slippage **as a fraction of 1R** (what a stop-out really costs)
- the minimum account size at which that coin/stop combination becomes placeable
- a plain-English `reason` / `warning` (e.g. "size rounds down 50% below your intended risk")

Leave **Account size** empty to just get a normalized contract-spec table across exchanges.

Exchanges: **OKX, Bitget, Gate, KuCoin, Toobit** (USDT-margined linear perpetuals). Only public, unauthenticated market-data endpoints are called. No API keys, no login, no orders, no proxies.

### Why

Most position-size calculators assume you can buy any fraction of a coin. Perpetual contracts come in fixed sizes (1 BTC contract is $80 on KuCoin and Toobit but $8 on OKX; 1 SOL contract is $100 on Gate and Toobit). With small accounts or wide stops that rounding silently changes your risk, or makes the trade impossible. Tight stops do the opposite: fees eat a big slice of each R.

### Input example

```json
{
  "exchanges": ["okx", "bitget", "gate", "kucoin", "toobit"],
  "coins": ["BTC", "ETH", "SOL"],
  "accountSizeUsd": 1000,
  "riskPercent": "1",
  "stopPercents": ["0.5", "2", "5"],
  "leverage": 10
}
```

### Output example (one row)

```json
{
  "exchange": "toobit", "coin": "SOL", "symbol": "SOL-SWAP-USDT", "stopPercent": 5.0,
  "tradeable": true, "reason": "ok",
  "warning": "size rounds down 50% below your intended risk (contract too coarse for this account)",
  "minOrderUsd": 100.53, "targetNotionalUsd": 200.0, "actualNotionalUsd": 100.53,
  "sizingShortfallPct": 49.73, "marginPctOfAccount": 1.01, "feesInR": 0.032,
  "minAccountForThisStop": 502.65
}
```

### Output fields

`exchange, coin, symbol, trading, price, contractValueBase, contractValueUsd, minQtyContracts, qtyStepContracts, minOrderUsd, tickSize, maxLeverage, makerFee, takerFee, feeSource, fetchedAt` and, when an account size is given, `accountSizeUsd, riskPercent, stopPercent, leverage, tradeable, reason, warning, riskUsd, targetNotionalUsd, orderQtyContracts, actualNotionalUsd, actualRiskUsd, sizingShortfallPct, marginUsd, marginPctOfAccount, roundTripCostPercent, feesInR, minAccountForThisStop`. A `SUMMARY` record in the key-value store lists untradeable combinations.

### Notes and limits

- Fees: Bitget, Gate and KuCoin return fee rates from their public APIs. OKX and Toobit use the published entry-tier rates (your VIP tier may be lower). Override with `roundTripCostPercent`.
- Toobit: order quantity is in contracts (Toobit API v2 docs); the Actor conservatively assumes a 1-contract minimum and step.
- Binance and Bybit are not included: their APIs geo-block some cloud regions.
- Funding payments are not included in the cost.
- If a coin has several perpetuals on one exchange, the first USDT-linear one listed is used.

### Disclaimer

Educational sizing math only. Not financial advice, not a trading signal. Exchange specs change; verify on the exchange before trading.

### Run locally

```bash
python -m venv .venv && . .venv/bin/activate && pip install -r requirements.txt
mkdir -p storage/key_value_stores/default && cp examples/input_1k.json storage/key_value_stores/default/INPUT.json
ACTOR_TEST_PAY_PER_EVENT=true CRAWLEE_STORAGE_DIR=$PWD/storage python -m src
```

# Actor input Schema

## `exchanges` (type: `array`):

Any of: okx, bitget, gate, kucoin, toobit. Public endpoints only.

## `coins` (type: `array`):

Base coin tickers, e.g. BTC, ETH, SOL.

## `accountSizeUsd` (type: `integer`):

Leave empty to only list contract specs. Fill it to run the sizing check.

## `riskPercent` (type: `string`):

Percent of the account lost if the stop is hit, e.g. 1 or 0.5.

## `stopPercents` (type: `array`):

Distance from entry to stop, in percent of price. One row per value.

## `leverage` (type: `integer`):

Used for margin math only.

## `slippagePercentPerSide` (type: `string`):

Added to taker fees on entry and exit for the cost-in-R estimate.

## `roundTripCostPercent` (type: `string`):

Optional. If set, replaces taker fee x2 + slippage.

## `maxRows` (type: `integer`):

Hard cap on dataset rows (each row is one billable result).

## Actor input object example

```json
{
  "exchanges": [
    "okx",
    "bitget",
    "gate",
    "kucoin",
    "toobit"
  ],
  "coins": [
    "BTC",
    "ETH",
    "SOL",
    "XRP",
    "DOGE"
  ],
  "accountSizeUsd": 1000,
  "riskPercent": "1",
  "stopPercents": [
    "0.5",
    "2",
    "5"
  ],
  "leverage": 10,
  "slippagePercentPerSide": "0.02",
  "maxRows": 500
}
```

# Actor output Schema

## `results` (type: `string`):

All rows, overview table view

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "exchanges": [
        "okx",
        "bitget",
        "gate",
        "kucoin",
        "toobit"
    ],
    "coins": [
        "BTC",
        "ETH",
        "SOL",
        "XRP",
        "DOGE"
    ],
    "accountSizeUsd": 1000,
    "stopPercents": [
        "0.5",
        "2",
        "5"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fullyautonomous/small-account-futures-order-checker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "exchanges": [
        "okx",
        "bitget",
        "gate",
        "kucoin",
        "toobit",
    ],
    "coins": [
        "BTC",
        "ETH",
        "SOL",
        "XRP",
        "DOGE",
    ],
    "accountSizeUsd": 1000,
    "stopPercents": [
        "0.5",
        "2",
        "5",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("fullyautonomous/small-account-futures-order-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "exchanges": [
    "okx",
    "bitget",
    "gate",
    "kucoin",
    "toobit"
  ],
  "coins": [
    "BTC",
    "ETH",
    "SOL",
    "XRP",
    "DOGE"
  ],
  "accountSizeUsd": 1000,
  "stopPercents": [
    "0.5",
    "2",
    "5"
  ]
}' |
apify call fullyautonomous/small-account-futures-order-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fullyautonomous/small-account-futures-order-checker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/dStuTpWkJxTXD8EoR/builds/jUWtdBieFNs1RvKOi/openapi.json
