0bps

Strategy vault / Other

coingecko_crawler

JavaScript strategy by linsilence.

JavaScriptOther
Author
linsilence
Complexity
Starter · 21 lines
Parameters
1

The original spec has no written description. Read the source below.

Parameters

NameDefaultWhat it controls
isDebugfalsedebug

Source JavaScript

  

const URL_API = 'https://api.coingecko.com/api/v3/coins/markets';

$.Grab_Symbols_Marketcap = function (count) {
    const param = `vs_currency=usd&order=market_cap_desc&per_page=${count}&page=1&sparkline=false`;
    const ret = JSON.parse(HttpQuery(URL_API + '?' + param));
    if (isDebug) Log('grab_marketcap 1 ret: ', ret);

    let symbos = [];
    ret.forEach(e => {
        symbos.push(e.symbol.toUpperCase());
    });
    if (isDebug) Log('grab_marketcap 2 ret: ', symbos);
    return symbos;
};

function main() {
    const s = $.Grab_Symbols_Marketcap(4);
    Log(s);
}

Published by linsilence on the FMZ strategy square · last modified 2021-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.

in Claude Code, Cursor, Codex & 4 more
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/coingecko_crawler.md
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. 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

esc

Try , , or .

↑↓ move↵ open