{"name":"CoinMargin Agent Math API","price":"$0.001 USDC per successful response","network":"Base mainnet","protocol":"x402 v2","openapi":"https://coinmargin-lab.ak10082247.workers.dev/openapi.json","agentGuide":"https://coinmargin-lab.ak10082247.workers.dev/SKILL.md","marketplace":{"profile":"https://payanagent.com/agents/j570p15f0dvyzt2w129s2qgn698bg8zd","price":"$0.01 USDC per successful response","offers":[{"tool":"tiny-trade","buyUrl":"https://payanagent.com/x402/kh70shafg04n54v29ww8nya5c58bh4gd"},{"tool":"break-even","buyUrl":"https://payanagent.com/x402/kh721h9dfze0c0p65h9ak16txs8bh878"},{"tool":"dca-average","buyUrl":"https://payanagent.com/x402/kh76zhg10kak96q5j7hfmk8h9x8bhkpq"},{"tool":"position-size","buyUrl":"https://payanagent.com/x402/kh7asddk416zh62zd0043bw2nh8bht0b"},{"tool":"risk-reward","buyUrl":"https://payanagent.com/x402/kh76qrhaw04b1zrpky14srnq818bgq0r"}]},"endpoints":[{"title":"Tiny-trade viability","endpoint":"https://coinmargin-lab.ak10082247.workers.dev/api/tiny-trade","method":"GET","description":"Calculate fee-aware break-even, profit or loss, ROI, and the exit needed to make a target profit on a small crypto trade.","required":["investment","entry","exit"],"example":"/api/tiny-trade?investment=5&entry=1&exit=1.01&buyFee=0.1&sellFee=0.1&fixedCosts=0&targetProfit=0.01"},{"title":"Break-even and target exit","endpoint":"https://coinmargin-lab.ak10082247.workers.dev/api/break-even","method":"GET","description":"Find the exact exit price that recovers buy fees, sell fees, fixed costs, and an optional target profit.","required":["investment","entry"],"example":"/api/break-even?investment=100&entry=2.5&buyFee=0.5&sellFee=0.5&fixedCosts=0&targetProfit=1"},{"title":"Fee-aware DCA average","endpoint":"https://coinmargin-lab.ak10082247.workers.dev/api/dca-average","method":"GET","description":"Combine three purchases into a fee-aware average entry, total quantity, current value, and unrealised profit or loss.","required":["amount1","price1","amount2","price2","amount3","price3","currentPrice"],"example":"/api/dca-average?amount1=300&price1=2.8&amount2=450&price2=2.2&amount3=250&price3=1.9&currentPrice=2.5&fee=0.5"},{"title":"Risk-based position size","endpoint":"https://coinmargin-lab.ak10082247.workers.dev/api/position-size","method":"GET","description":"Calculate a position quantity and notional value from account size, risk percentage, entry price, stop price, and a fee buffer.","required":["accountSize","riskPercent","entry","stop"],"example":"/api/position-size?accountSize=1000&riskPercent=1&entry=2.5&stop=2.25&feeBuffer=0.2"},{"title":"Fee-aware risk/reward","endpoint":"https://coinmargin-lab.ak10082247.workers.dev/api/risk-reward","method":"GET","description":"Compare a target and stop around an entry price, including transaction fees, to calculate net reward, net risk, and their ratio.","required":["entry","stop","target"],"example":"/api/risk-reward?entry=2.5&stop=2.25&target=3&quantity=10&buyFee=0.5&sellFee=0.5"}],"note":"Deterministic trade maths only; not market data or financial advice."}