Strategy vault / Tools & templates
BitMEX Simple Test
Now connected to BitMEX, supports full platform API, supports IO expansion.
Now connected to BitMEX, supports full platform API, supports IO expansion.
Source JavaScript
// Only supports real offers
function main() {
exchange.SetContractType("XBTUSD")
Log(_C(exchange.GetAccount))
Log(_C(exchange.GetTicker))
Log(_C(exchange.GetDepth))
Log(_C(exchange.GetRecords))
Log(_C(exchange.GetTrades))
// IO Test
Log(_C(exchange.IO, "api", "GET", "user/affiliateStatus"))
Log(_C(exchange.SetMarginLevel, 10))
exchange.SetDirection("buy")
var orderId = exchange.Buy(-1, 3)
if (orderId) {
Log(_C(exchange.GetOrder, orderId))
}
Log(_C(exchange.GetPosition))
}Published by 发明者量化 on the FMZ strategy square · last modified 2017-05-08. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a tested, production-ready module from strategies/BitMEX-Simple-Test.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- Binance Account Cross Transfer Small ToolJavaScript · Tools & templates
- Get cryptocurrency current and max supplyJavaScript · Tools & templates
- Interaction TemplateJavaScript · Tools & templates
- KuCoin Fund Transfer PluginJavaScript · Tools & templates
- Moving Average Bot 30 linesJavaScript · Tools & templates · 1d
- OKEx V5 Candlestick Data Paginated Query ExampleJavaScript · Tools & templates