# Funding Arbitrage Bot Example

## Overview

**Funding Arbitrage Bot** is an open-source trading bot designed for delta-neutral funding-rate arbitrage across supported perpetual venues.

The bot uses VOOI funding strategy data to find potential funding-rate arbitrage setups between supported venues. When a strategy meets the configured conditions, the bot can open paired positions on the same asset: one long position and one short position.

The goal is to reduce directional price exposure while collecting the funding-rate difference between venues.

{% hint style="warning" %}
This bot example is provided for educational purposes only. It is not financial advice and does not guarantee profit.

This bot was generated with AI-assisted development and tested before publication. It demonstrates how VOOI Ultra users can quickly prototype trading bots and agentic trading workflows using VOOI Perps API access available through VOOI Ultra.

Testing does not make the bot risk-free. Trading bots can place real orders and interact with real funds. Review the code, configuration, strategy, and risk controls before running any bot with live capital.
{% endhint %}

You can also inspect, test, and customize this bot with AI coding agents such as Claude Code, Codex, or Cursor.

## How it works

The bot is based on the same type of funding arbitrage workflow available in VOOI Ultra: [VOOI Funding Arbitrage](/vooi-ultra-v3/vooi_ultra-tools/vooi-funding-arbitrage.md)

It uses VOOI funding strategy data to find potential cross-venue setups for the same asset. When a strategy meets the configured conditions, the bot can open two opposite positions for the same asset:

* long position on one venue
* short position on another venue

The two legs are designed to offset each other’s price exposure.

After opening a position, the bot monitors the strategy and can close it when the spread decays, reverses, reaches the maximum holding time, or hits configured risk limits.

## What this example demonstrates

This bot is useful as a technical example for:

* cross-venue funding-rate strategies
* paired long and short position management
* automated monitoring and order placement
* risk controls for automated strategies
* agent-assisted customization of trading automation

## Before running this bot

**Trading bots can place real orders and interact with real funds.**

Before running any example with live capital:

1. Read the repository README.
2. Review the strategy, configuration, and risk controls.
3. Inspect the code yourself or ask an AI coding agent to inspect it.
4. Start with dry-run or test mode where available.
5. Use small balances first.
6. Monitor logs, open positions, and bot activity.

Important risks include funding spread reversal, one leg filling while the other fails, venue outages, slippage, liquidation risk, incorrect configuration, and loss of access to credentials or the runtime environment.

## Requirements

The exact setup requirements are maintained in the repository README.

In general, this bot is intended for users who have:

* **VOOI Ultra account** with access to API token generation
* **VOOI API token** generated in VOOI Ultra <https://ultra.vooi.io/api-tokens>
* balances on at least two supported perpetual venues
* bot-specific venue settings required for the selected exchanges
* a local machine or server where the bot can run
* enough technical experience to review logs and configuration files

VOOI Perps API is not publicly available as a standalone public API. These examples use API access available through VOOI Ultra for registered users.

Check the repository README for the current list of required credentials, environment variables, supported venues, and deployment options.

## Deployment and Repository

The repository README includes the current setup and deployment instructions.

Typical setup flows may include local dry-run testing, VPS deployment for long-running operation, or container-based deployment if supported by the repository.

**Repository:** <https://github.com/vooi-app/vooi-funding-bot-example>

## Using an AI coding agent (optional)

You can ask Claude Code, Codex, Cursor, or another coding agent to inspect the codebase, explain the funding arbitrage logic, review risk parameters, and help run the bot in dry-run mode before any live deployment.

This workflow can be useful for agentic trading and what is often called vibe coding: start from an existing open-source bot, describe what you want to change, and use an AI coding agent to help modify and test the implementation.

**Example prompt:**

> Inspect this repository and explain what the Funding Arbitrage Bot does.
>
> Read the README, configuration files, dependency files, and deployment instructions.
>
> Check whether there are unsafe operations, hard-coded secrets, suspicious dependencies, or anything that should be reviewed before running the bot with real funds.
>
> Explain what credentials and settings are required from me.
>
> Help me set up the bot in dry-run or test mode first.
>
> Do not enable live trading or place real orders unless I explicitly confirm.

## Next Steps

* Open the repository README for full setup and deployment instructions for **Funding Arbitrage Bot**
* Check another bot example: [Signal Bot Example](/vooi-ultra-v3/vooi_ultra-automationexamples/signal-bot-example.md)


---

# 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.vooi.io/vooi-ultra-v3/vooi_ultra-automationexamples/funding-arbitrage-bot-example.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.
