# Quick start

## API Keys

Two key types are available:

| Key Type | Requests/Minute | Commission               |
| -------- | --------------- | ------------------------ |
| Free     | 20              | 0%                       |
| Standard | 60              | From `feeShareBps` param |

Pass the key in the `api-key` header with each request.

> API is accessible without a key (20 req/min), but a key is required for higher rate limits and commission earning.

**Test keys:**

* Free: `test-sdk-test-sdk-test-sdk-free`
* Standard: `test-sdk-test-sdk-test-sdk-standard`

**Production keys:** [@Eywa\_BDLead](https://t.me/Eywa_BDLead) / <a.gluhovskij@eywa.fi>

***

## Example: USDC from Arbitrum to Ethereum

### 1. Get Route

```bash
curl -X POST "https://api.crosscurve.fi/routing/scan" \
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_KEY" \
  -d '{
    "params": {
      "chainIdIn": 42161,
      "chainIdOut": 1,
      "tokenIn": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "amountIn": "1000000000"
    },
    "slippage": 1
  }'
```

Response contains an array of routes with fees, expected amount, and execution time. Use the first route `routes[0]`.

### 2. Create Transaction

```bash
curl -X POST "https://api.crosscurve.fi/tx/create" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "0xYourWallet",
    "recipient": "0xYourWallet",
    "routing": <route object from step 1>,
    "buildCalldata": true
  }'
```

Response `{ to, value, data }` is ready to send via any Web3 library.

### 3. Send Transaction

```javascript
// Approve token to the contract
await tokenContract.approve(txData.to, amount);

// Send transaction
const tx = await signer.sendTransaction(txData);
```

### 4. Track Status

```bash
# Find requestId by transaction hash
curl "https://api.crosscurve.fi/search?search=0xYourTxHash"

# Check status (poll every 5 sec)
curl "https://api.crosscurve.fi/transaction/{requestId}"
```

Status `completed` means successful completion.

***

## Reference Endpoints

| Endpoint                          | Returns                                           |
| --------------------------------- | ------------------------------------------------- |
| `GET /networks`                   | List of supported networks with chainId           |
| `GET /tokenlist`                  | Tokens by network (need `can_swap` tag for swaps) |
| `GET /prices/{address}/{chainId}` | Token price in USD                                |

***

## Next Steps

* [Full API Documentation](broken://pages/86b1f8bc58399e37bd850da0b4985fdd8b6b2276) — all endpoints and parameters
* [TypeScript SDK](https://www.npmjs.com/package/@crosscurve/sdk) — Viem, Ethers, Web3
* [Swagger UI](https://api.crosscurve.fi/api-docs/) — interactive testing
* [Partner Program](/partnership-opportunities.md) — fee sharing terms

***

**Questions?** Contact us: [@Eywa\_BDLead](https://t.me/Eywa_BDLead)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.crosscurve.fi/quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
