Sandbox Config Documentation
Overview
FloatPilot configs let you write logic that processes historical listings and recommends a price or decision based on an array called listings[]
.
How it works
- You will receive a predefined array called
listings
. - Each listing is a JavaScript object with data like
price
,float
,pattern
, etc. - You must return a single number (e.g., recommended price).
Example
let total = 0;
for (let l of listings) {
total += l.price;
}
return total / listings.length;
This returns the average price from the listings array.
Security and Restrictions
- Scripts are sandboxed: no network or external access allowed.
- No access to
window
,fetch
, ordocument
. - Only pure JavaScript logic is supported.
Available Fields
listing.price
: number (price in FF)listing.float
: number (float value)listing.pattern
: string (e.g., phase, fade percentage)listing.stickers
: array of sticker names (if any)
Tips
- Wrap logic in try/catch to avoid runtime crashes.
- Test your config with various listing arrays before uploading.
- Smaller configs run faster — optimize if possible.
This documentation is for FloatPilot config creators only.