WOOFI PRO Trading Bot in Python¶
This guide shows how to build a WOOFI PRO trading bot in Python with LumiBot, for both AI agent trading and algorithmic trading. LumiBot connects to WOOFI PRO through CCXT, the open source library that talks to more than 100 crypto exchanges. You will create a WOOFI PRO account and API key, connect it, and run two examples: a simple algorithmic trading bot and an agentic trading bot where an AI agent makes the calls.
WOOFI PRO at a glance¶
CCXT exchange id |
|
Markets |
Perpetual swaps |
Testnet (sandbox) |
Yes |
Credentials |
account id, API key, API secret |
Live data streams |
prices, order book, trades, candles, your orders, your balance, your positions |
CCXT request spacing |
about 100 ms between requests |
Official site |
|
API docs |
https://orderly.network/docs/build-on-omnichain/building-on-evm |
Fees |
What is WOOFI PRO?¶
WOOFi Pro is an order book exchange for perpetual futures, built on Orderly Network. You keep custody of your funds and trade with USDC.
Sign up for WOOFI PRO¶
Open WOOFi Pro and sign in with email, a social login, or a crypto wallet on a supported chain.
Sign the two free signature requests WOOFi Pro shows to enable trading (they cost no gas), then deposit USDC with the Deposit button.
For practice, open the WOOFi Pro testnet at https://testnet-pro.woofi.com/en/trade/ETH_PERP and click Get test USDC. Test funds show up after a few minutes.
Create a WOOFI PRO API key¶
Log in to WOOFi Pro and open the API key page in your Portfolio (https://pro.woofi.com/en/portfolio/api-key).
Click Create API key.
Confirm the request. WOOFi Pro then shows your Account ID, Orderly Key and Orderly Secret.
Copy all three somewhere safe. In LumiBot (through CCXT), the Account ID is
accountId, the Orderly Key isapiKeyand the Orderly Secret issecret.Note the key’s expiry date. Orderly keys expire, at most 365 days after they are added, so make a new key before then.
Which permissions to turn on: Orderly keys have two scopes: read (account data) and trading (placing and cancelling orders). Your bot needs both. Withdrawals cannot be done with the Orderly key alone: Orderly requires a signature from your wallet for every withdrawal, so the bot’s key can trade but cannot move money out.
Warning
Never turn on withdrawals for a WOOFI PRO trading bot key. Bind the key to your server’s IP address when WOOFI PRO lets you, keep the secret out of your code and out of Git, and delete the key if it ever leaks.
Connect WOOFI PRO to LumiBot¶
The simplest way: put these lines in a .env file next to your strategy. LumiBot loads the file, sees TRADING_BROKER=woofipro and connects to WOOFI PRO for you, so your strategy needs no broker code.
TRADING_BROKER=woofipro
WOOFIPRO_ACCOUNT_ID=your_accountId
WOOFIPRO_API_KEY=your_apiKey
WOOFIPRO_API_SECRET=your_secret
WOOFIPRO_SANDBOX=true # testnet; remove this line for your live account
LumiBot reads exactly the fields CCXT needs for WOOFI PRO (accountId, apiKey, secret). If one is missing, LumiBot stops at start-up and names the variable you still need.
You can also build the broker in code. This is handy when one script talks to more than one exchange, or when you need extra CCXT options. The keys in the config are CCXT’s own credential names for WOOFI PRO:
import os
WOOFIPRO_CONFIG = {
"exchange_id": "woofipro",
"accountId": os.environ.get("WOOFIPRO_ACCOUNT_ID"),
"apiKey": os.environ.get("WOOFIPRO_API_KEY"),
"secret": os.environ.get("WOOFIPRO_API_SECRET"),
"sandbox": True, # testnet first; set False for your live account
}
from lumibot.brokers import Ccxt
broker = Ccxt(WOOFIPRO_CONFIG)
# then: MyStrategy(broker=broker, ...)
Either way, LumiBot turns on CCXT’s built-in rate limiting for you.
Practice on the WOOFI PRO testnet¶
WOOFi Pro has a testnet at https://testnet-pro.woofi.com with free test USDC from the Get test USDC button. Make a separate API key there. Set WOOFIPRO_SANDBOX=true (or "sandbox": True in a code config) to use it.
CCXT sends sandbox requests to: https://testnet-api-evm.orderly.org. Testnet and live accounts use different keys.
Algorithmic trading example: a simple WOOFI PRO bot¶
CCXT lists no spot market for WOOFI PRO, so this example trades a perpetual contract. It opens one small long BTC position worth about 50 USDC and then holds it. It is a starting point to check that your keys, balances and orders work. If the exchange’s minimum order is larger, raise the amount. If your account uses hedge mode, add position_side="long" to create_order. WOOFI PRO accepts only limit orders through CCXT, so the example places a limit order just above the last price.
from lumibot.entities import Asset
from lumibot.strategies import Strategy
class WoofiproOpenOneLong(Strategy):
"""Open one small long BTC perpetual position, then hold it."""
def initialize(self):
self.sleeptime = "1H"
self.set_market("24/7") # crypto trades all day, every day
def on_trading_iteration(self):
# The full CCXT symbol keeps the settlement currency clear.
contract = self.broker.get_asset("BTC/USDC:USDC")
if self.get_position(contract) is not None:
return # already holding the position
price = self.get_last_price(contract)
if price:
# Each contract covers contract.multiplier BTC; size the order to about 50 USDC.
quantity = round(50 / (price * contract.multiplier), 6)
# This exchange takes only limit orders through CCXT.
order = self.create_order(contract, quantity, "buy", limit_price=price * 1.002)
self.submit_order(order)
if __name__ == "__main__":
# LumiBot reads TRADING_BROKER and the keys from your .env file.
strategy = WoofiproOpenOneLong(quote_asset=Asset("USDC", asset_type=Asset.AssetType.CRYPTO))
strategy.run_live()
Agentic trading example: an AI agent that trades on WOOFI PRO¶
Agentic trading means an AI agent reads the market and decides what to do. In this example one LumiBot agent looks at prices and your WOOFI PRO account, then places the orders itself. There is no Python logic in between: you set the rules in plain English in the prompt, such as what it may trade and how big each order can be. This follows the same pattern as LumiBot’s AI trading team examples.
from lumibot.entities import Asset
from lumibot.strategies import Strategy
class WoofiproAITrader(Strategy):
"""One AI agent researches the market and places the trades itself."""
def initialize(self):
self.sleeptime = "4H"
self.set_market("24/7")
self.agents.create(
name="trader",
model="openai/gpt-6-luna",
reasoning_effort="high",
allow_trading=True,
system_prompt=(
"You manage a small crypto account on WOOFI PRO. "
"You may trade the BTC/USDC:USDC perpetual contract (asset_type 'crypto_future'), long or short, or stay flat. "
"Before every order, call account_portfolio, account_positions and "
"market_last_price for that exact symbol in the same run. "
"Keep each order under 10% of the account value. "
"Explain each decision in one short paragraph."
),
)
def on_trading_iteration(self):
self.agents["trader"].run(
task_prompt="Review recent BTC/USDC:USDC prices and your current position, then decide whether to buy, sell or hold.",
context={"exchange": "WOOFI PRO", "quote": "USDC", "date": self.get_datetime().isoformat()},
)
if __name__ == "__main__":
# LumiBot reads TRADING_BROKER and the keys from your .env file.
strategy = WoofiproAITrader(quote_asset=Asset("USDC", asset_type=Asset.AssetType.CRYPTO))
strategy.run_live()
The agent needs a model key such as OPENAI_API_KEY in your environment. See the AI agents quickstart for models, tools and memory.
What you can trade on WOOFI PRO through CCXT¶
Market |
Listed by CCXT |
|---|---|
Spot |
No |
Margin |
No |
Perpetual swaps |
Yes |
Dated futures |
No |
Options |
No |
CCXT lists these order features for WOOFI PRO: limit orders, stop-loss orders, take-profit orders, reduce-only orders, editing open orders, canceling orders.
For perpetual contracts, use the full CCXT symbol so the settlement currency is clear, for example BTC/USDC:USDC. See the CCXT guide for contract quantities, position modes and leverage.
WOOFI PRO tips¶
WOOFi Pro only lists perpetual futures, so symbols use the full CCXT form, for example
BTC/USDC:USDC. There are no spot markets.WOOFi Pro’s old address dex.woo.org now redirects to https://pro.woofi.com.
The CCXT id
woofiprois WOOFi Pro. The CCXT idwoois the separate WOO X exchange, with its own accounts and keys.
Frequently asked questions¶
Can I build a WOOFI PRO trading bot in Python?
Yes. Install LumiBot (pip install lumibot), set your WOOFI PRO keys and use the woofipro CCXT exchange id as shown above.
Does WOOFI PRO have a testnet?
Yes. Set WOOFIPRO_SANDBOX=true and use keys from the WOOFI PRO testnet.
Which API permissions does a WOOFI PRO bot need?
Orderly keys have two scopes: read (account data) and trading (placing and cancelling orders). Your bot needs both. Withdrawals cannot be done with the Orderly key alone: Orderly requires a signature from your wallet for every withdrawal, so the bot’s key can trade but cannot move money out.
Can an AI agent trade on WOOFI PRO by itself?
Yes. The agentic example above gives one agent permission to trade. You control what it may trade and how much through its prompt.
Can I trade WOOFI PRO perpetual futures with LumiBot?
CCXT lists perpetual swaps for this exchange. Use the full contract symbol, such as BTC/USDC:USDC.
Is LumiBot free?
Yes. LumiBot is open source on GitHub at https://github.com/Lumiwealth/lumibot. You pay only your exchange’s trading fees and, for AI agents, your model provider.
Run it in the cloud with BotSpot¶
Do not want to keep a computer running for your WOOFI PRO bot? BotSpot is the hosted home for LumiBot strategies and AI trading agents: build with AI, backtest, connect a broker, and watch every trade with logs and alerts.
Sources¶
WOOFi Docs: API trading on WOOFi Pro (read 2026-10-23)
WOOFi Docs: Perpetual futures (read 2026-10-23)
Orderly Docs: Wallet Authentication (Orderly key scopes, expiry, withdrawals) (read 2026-10-23)
Exchange id, URLs, markets, credentials and stream support: CCXT 4.5.64 metadata, generated 2026-10-23