Test network · stand-in tokens, real prices · no real moneyWhere the project stands
oasis:~/docs/algorithms

Algorithms

Host your own code and sell access to it.

Works on the test network. Listing an algorithm is done on chain; registering its address is done with the API. The app has no form for it yet.

An algorithm is a strategy that lives on your server. Buyers never see the code. The Oasis agent asks your server what to do for each buyer's vault and trades what it answers, inside that buyer's limits.

How it is called

Every few minutes, for each vault that follows your algorithm, your server receives the vault's limits, balances and prices. It replies with a list of orders.

POST https://your-server.example/orders
{
  "vault":    "0x…",
  "limits":   { "perRun": 50, "perDay": 100, "spentToday": 25 },
  "balances": { "USDG": 870, "AAPL": 2.2167 },
  "prices":   { "AAPL": 350.65, "NVDA": 181.20 }
}

→ 200
{ "orders": [ { "sell": "USDG", "buy": "AAPL", "usd": 25, "reason": "5% under the 20-day average" } ] }
  • At most 3 orders per answer.
  • An empty list means: wait.
  • An order that breaks the buyer's limits is dropped, not resized.
  • Every order needs a reason. It is shown to the buyer.
  • Your server must answer over https within 5 seconds.

Listing it

Publish a listing of kind “algorithm” on the marketplace contract, then register your server's address with POST /api/listing/:id/endpoint, signed in as the seller. Its record is counted the same way as any agent's: from the chain's own records.