{"info":{"contact":{"email":"dfergin@wgu.edu","name":"ScalpStream","url":"https://scalpstream.com/"},"description":"Machine-payable wash-sale checks over x402. Send your own trades and ask whether buying or selling a ticker on a date would wash a loss under the US rule (IRC 1091), across taxable, IRA and spouse accounts together: disallowed loss, adjusted basis, safe rebuy date, realized gains by year. A rule calculation, not tax advice. A ScalpStream agent.","title":"BasisScout","version":"1.0.0","x-guidance":"GET /basis?trades=\u003crows\u003e\u0026check=buy\u0026symbol=PLTR\u0026on=2026-09-20 asks whether buying PLTR on that date disallows a loss already taken; check=sell with account= and quantity= asks how much of a loss sale would already be washed. trades is the caller's own rows (account,account_type,date,symbol,kind,quantity,price[,fees], ';'-separated, or a JSON array). Leave check out for the ledger alone. Nothing sent is stored. Each paid call (GET /basis) costs $0.01 over x402 v2: an unpaid request returns 402 with accepts[] (USDC on Base, USDC on Arbitrum, USDC on Polygon, USDC on Solana, XRP on the XRP Ledger, RLUSD on the XRP Ledger); pay one option and repeat the request with the PAYMENT-SIGNATURE header. Parameters are validated before anything settles: a paid request with invalid or unsupported parameters gets 400 and is not charged; a valid one is charged when it settles, before the data is fetched. POST is answered exactly like GET, with the parameters in the query string. Free, no payment: GET /preview."},"openapi":"3.1.0","paths":{"/basis":{"get":{"description":"Wash sales (US): would buying or selling this stock today wash a loss? Applies IRC 1091 to the trades you send, across taxable, IRA and spouse accounts: disallowed loss, adjusted basis, safe rebuy date, realized gains by year. BasisScout","operationId":"basis","parameters":[{"description":"Your trades: rows account,account_type,date,symbol,kind,quantity,price[,fees] separated by ';' (account_type: taxable, trad_ira, roth_ira, spouse_taxable, spouse_ira; kind: buy, sell, reinvest, stock_plan_acquire; dates YYYY-MM-DD), or a JSON array of objects with those field names and an optional id. Rows are named t1, t2, ... in the order sent unless the JSON names them. At most 500 rows.","example":"fid,taxable,2026-08-01,PLTR,buy,100,10;fid,taxable,2026-09-03,PLTR,sell,100,8","in":"query","name":"trades","required":true,"schema":{"examples":["fid,taxable,2026-08-01,PLTR,buy,100,10;fid,taxable,2026-09-03,PLTR,sell,100,8"],"type":"string"}},{"description":"The pre-trade question: buy (would buying symbol on this date disallow a loss already taken?) or sell (if quantity were sold at a loss from account on this date, how much is already washed?). Leave out for the ledger alone: determinations, sales and the year's totals.","example":"buy","in":"query","name":"check","required":false,"schema":{"examples":["buy"],"type":"string"}},{"description":"The ticker the question is about, as it appears in trades. Required with check.","example":"PLTR","in":"query","name":"symbol","required":false,"schema":{"examples":["PLTR"],"type":"string"}},{"description":"The date of the proposed trade, YYYY-MM-DD. Default: today (UTC).","example":"2026-09-20","in":"query","name":"on","required":false,"schema":{"examples":["2026-09-20"],"type":"string"}},{"description":"check=buy: where the purchase would be. A purchase in an IRA disallows the loss permanently.","in":"query","name":"account_type","required":false,"schema":{"default":"taxable","enum":["taxable","trad_ira","roth_ira","spouse_taxable","spouse_ira"],"type":"string"}},{"description":"check=sell: the account the shares would be sold from, as named in trades. Required with check=sell.","in":"query","name":"account","required":false,"schema":{"type":"string"}},{"description":"check=sell: how many shares would be sold. Required with check=sell.","in":"query","name":"quantity","required":false,"schema":{"type":"number"}},{"description":"The tax year year_summary totals. Default: the year of `on` with a check, otherwise the year of the latest trade.","in":"query","name":"year","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"kind":"wash_sale_check","trades_received":2,"check":{"action":"buy","symbol":"PLTR","on":"2026-09-20","account_type":"TAXABLE","safe":false,"safe_date":"2026-10-04","max_disallowed":"200.00","permanent":false,"windows":[{"sale_id":"t2","sale_date":"2026-09-03","account":"fid","shares_washable":"100","loss_per_share":"2","max_disallowed":"200.00","safe_date":"2026-10-04"}],"statement":"Buying PLTR before Oct 4, 2026 disallows $200.00 from your Sep 3, 2026 sale in fid. Safe to rebuy Oct 4, 2026. The disallowed loss would be added to the new shares' basis, not destroyed."},"determinations":[],"sales":[{"sale_id":"t2","date":"2026-09-03","account":"fid","symbol":"PLTR","quantity":"100","realized":"-200.00","disallowed":"0.00","allowed":"-200.00","short_term":"-200.00","long_term":"0.00","in_ira":false}],"year_summary":{"year":2026,"realized":"-200.00","short_term":"-200.00","long_term":"0.00","disallowed_total":"0.00","disallowed_permanent":"0.00","allowed":"-200.00"},"open_lots":[],"errors":[],"scope":"US federal wash-sale rule only, matched on the same ticker across every account sent (taxable, traditional and Roth IRA, spouse). Not modelled: options on the same underlying, short sales, stock splits, \"substantially identical\" pairs (share classes, similar ETFs) and digital assets, to which the rule does not currently apply. FIFO lot matching. Trade dates, not settlement dates.","privacy":"The trades you send are processed in memory for this response only. They are not stored, not logged and not shared.","source":"Rule: Internal Revenue Code section 1091 and IRS Publication 550, Investment Income and Expenses (Wash Sales). The calculation is BasisScout's own.","attribution":{"lines":["The wash-sale rule applied here is Internal Revenue Code section 1091, in the form IRS Publication 550 describes it (a US Government work in the public domain).","BasisScout is not affiliated with or endorsed by the IRS or by any broker."],"sources":[{"name":"Internal Revenue Code section 1091 and IRS Publication 550, Investment Income and Expenses (Wash Sales)","licence":"Public domain (U.S. Government work)","licence_url":"https://www.usa.gov/government-copyright","url":"https://www.irs.gov/publications/p550"}],"text":"The wash-sale rule applied here is Internal Revenue Code section 1091, in the form IRS Publication 550 describes it (a US Government work in the public domain).\nBasisScout is not affiliated with or endorsed by the IRS or by any broker."},"disclaimer":"BasisScout is a record-keeping calculation, not tax advice. It applies the US wash-sale rule (IRC section 1091) to the trades you send, using same-ticker matching only. It cannot see trades you did not send, cannot decide whether two different securities are \"substantially identical\", and does not know your full tax situation. Confirm results with a tax professional before relying on them. BasisScout is not affiliated with any broker or with the IRS.","receipt":"example"},"schema":{"properties":{"attribution":{"description":"The rule this calculation applies and where it is published, then the line that BasisScout is not affiliated with the IRS or any broker. Show every line verbatim with the result.","properties":{"lines":{"description":"The same credit lines, verbatim and in order.","items":{"type":"string"},"type":"array"},"sources":{"description":"One entry per data source the answer rests on.","items":{"properties":{"licence":{"description":"The licence or terms the data is reused under.","type":"string"},"licence_url":{"description":"Where that licence is published, when it has a URL.","type":"string"},"name":{"description":"The source, as it asks to be named.","type":"string"},"url":{"description":"The source's own site.","type":"string"}},"type":"object"},"type":"array"},"text":{"description":"The credit lines joined with newlines: show it verbatim with the data.","type":"string"}},"type":"object"},"check":{"description":"The pre-trade answer; present when check was asked.","properties":{"account":{"description":"check=sell: the selling account.","type":"string"},"account_type":{"description":"check=buy: where the purchase would be.","type":"string"},"action":{"description":"buy or sell.","type":"string"},"max_disallowed":{"description":"A dollar amount with two decimals, as a string. buy, when not safe: the most the purchase could disallow, over every open window.","type":"string"},"on":{"description":"YYYY-MM-DD.","type":"string"},"permanent":{"description":"The loss would be lost permanently rather than deferred: the buy would be in an IRA, or a replacement purchase is.","type":"boolean"},"quantity":{"description":"A share quantity, as a plain decimal string. check=sell.","type":"string"},"replacements":{"description":"sell, when not safe: every purchase that would wash it.","items":{"description":"One purchase in the 30 days before `on` that would wash the sale.","properties":{"account":{"type":"string"},"date":{"description":"YYYY-MM-DD.","type":"string"},"permanent":{"description":"The purchase is in an IRA: the loss on those shares would be lost, not deferred.","type":"boolean"},"shares":{"description":"A share quantity, as a plain decimal string. How many of its shares can still serve as replacements.","type":"string"},"trade_id":{"type":"string"}},"type":"object"},"type":"array"},"safe":{"description":"buy: no loss sale of this ticker in the 30 days before `on` has unwashed shares. sell: no purchase in the 30 days before `on` would wash the sale. Among the trades sent; not a recommendation.","type":"boolean"},"safe_date":{"description":"YYYY-MM-DD. buy, when not safe: the first day a purchase washes nothing.","type":"string"},"statement":{"description":"The answer in a sentence, stating the rule calculation. Show it verbatim.","type":"string"},"symbol":{"type":"string"},"washable_shares":{"description":"A share quantity, as a plain decimal string. sell: how many of the shares' loss is already washed by earlier purchases.","type":"string"},"windows":{"description":"buy, when not safe: every open window.","items":{"description":"One loss sale a purchase on `on` would wash.","properties":{"account":{"type":"string"},"loss_per_share":{"description":"The loss per share on those shares.","type":"string"},"max_disallowed":{"description":"A dollar amount with two decimals, as a string. The most a purchase could disallow from this sale.","type":"string"},"safe_date":{"description":"YYYY-MM-DD. The first day a purchase no longer washes this sale.","type":"string"},"sale_date":{"description":"YYYY-MM-DD.","type":"string"},"sale_id":{"description":"The loss sale, by trade id.","type":"string"},"shares_washable":{"description":"A share quantity, as a plain decimal string. How many of its loss shares are still unwashed.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"determinations":{"description":"Every disallowance in the trades sent, in replay order.","items":{"description":"One disallowance: this many shares of that loss sale were washed by this purchase.","properties":{"basis_adjusted_qty":{"description":"A share quantity, as a plain decimal string. Shares whose basis rose by the disallowed loss (0 when permanent).","type":"string"},"disallowed":{"description":"A dollar amount with two decimals, as a string.","type":"string"},"loss_sale_id":{"type":"string"},"permanent":{"description":"Replacement in an IRA: no basis adjustment, loss gone.","type":"boolean"},"replacement_account":{"type":"string"},"replacement_trade_id":{"type":"string"},"shares_washed":{"description":"A share quantity, as a plain decimal string.","type":"string"},"window_end":{"description":"YYYY-MM-DD.","type":"string"},"window_start":{"description":"YYYY-MM-DD.","type":"string"}},"type":"object"},"type":"array"},"disclaimer":{"type":"string"},"errors":{"description":"Rows the rule could not apply to, by trade id: a sale of more than the account held (capped at the holding), an unsupported kind, a non-positive quantity. Never silently dropped.","items":{"type":"string"},"type":"array"},"kind":{"description":"wash_sale_check.","type":"string"},"open_lots":{"description":"Every open lot after the replay.","items":{"description":"An open lot after the replay, with the basis and holding date it now carries.","properties":{"account":{"type":"string"},"acquisition_id":{"description":"The purchase it came from.","type":"string"},"adjusted":{"description":"These shares absorbed a disallowed loss.","type":"boolean"},"basis_per_share":{"description":"Six decimals; includes fees and any disallowed loss added.","type":"string"},"holding_date":{"description":"YYYY-MM-DD. The date the holding period runs from, after any tacking.","type":"string"},"quantity":{"description":"A share quantity, as a plain decimal string.","type":"string"},"symbol":{"type":"string"}},"type":"object"},"type":"array"},"privacy":{"description":"What happens to the trades sent: nothing.","type":"string"},"receipt":{"description":"The payment receipt, echoed.","type":"string"},"sales":{"description":"Every sale, in replay order.","items":{"description":"One sale, FIFO against the account's lots.","properties":{"account":{"type":"string"},"allowed":{"description":"A dollar amount with two decimals, as a string. realized plus disallowed.","type":"string"},"date":{"description":"YYYY-MM-DD.","type":"string"},"disallowed":{"description":"A dollar amount with two decimals, as a string.","type":"string"},"in_ira":{"description":"A sale inside an IRA is not a taxable event and is left out of year_summary.","type":"boolean"},"long_term":{"description":"A dollar amount with two decimals, as a string. The realized figure on shares held more than one year, counting any tacked holding period.","type":"string"},"quantity":{"description":"A share quantity, as a plain decimal string.","type":"string"},"realized":{"description":"A dollar amount with two decimals, as a string. Gain (negative = loss) before wash-sale adjustment, net of fees.","type":"string"},"sale_id":{"type":"string"},"short_term":{"description":"A dollar amount with two decimals, as a string. The realized figure on shares held one year or less.","type":"string"},"symbol":{"type":"string"}},"type":"object"},"type":"array"},"scope":{"description":"What the calculation covers and leaves out.","type":"string"},"source":{"type":"string"},"trades_received":{"type":"integer"},"year_summary":{"description":"The tax year's totals, IRA sales excluded.","properties":{"allowed":{"description":"A dollar amount with two decimals, as a string. realized plus disallowed_total.","type":"string"},"disallowed_permanent":{"description":"A dollar amount with two decimals, as a string. The part lost for good (IRA replacements).","type":"string"},"disallowed_total":{"description":"A dollar amount with two decimals, as a string. Disallowances whose loss sale fell in this year.","type":"string"},"long_term":{"description":"A dollar amount with two decimals, as a string.","type":"string"},"realized":{"description":"A dollar amount with two decimals, as a string.","type":"string"},"short_term":{"description":"A dollar amount with two decimals, as a string.","type":"string"},"year":{"type":"integer"}},"type":"object"}},"type":"object"}}},"description":"The paid result, returned once the payment has settled."},"400":{"description":"A malformed payment header, or parameters this service cannot answer. Checked BEFORE anything settles, so nothing is charged; fix the request and pay a fresh quote."},"402":{"content":{"application/json":{"schema":{"properties":{"accepts":{"items":{"properties":{"amount":{"description":"atomic units of the asset (USDC 0.01 = 10000)","type":"string"},"asset":{"type":"string"},"extra":{"type":"object"},"maxTimeoutSeconds":{"type":"integer"},"network":{"description":"CAIP-2, e.g. eip155:8453 (Base) or xrpl:0","type":"string"},"payTo":{"type":"string"},"scheme":{"type":"string"}},"required":["scheme","network","amount","asset","payTo"],"type":"object"},"type":"array"},"error":{"type":"string"},"extensions":{"type":"object"},"resource":{"type":"object"},"x402Version":{"type":"integer"}},"required":["x402Version","accepts"],"type":"object"}}},"description":"Payment Required: an x402 v2 challenge. accepts[] lists every rail this path can be paid on; pay one and repeat the request with the payment in the PAYMENT-SIGNATURE header.","headers":{"PAYMENT-REQUIRED":{"description":"The same challenge, base64-encoded JSON.","schema":{"type":"string"}}}}},"security":[],"summary":"Wash sales (US): disallowed loss, adjusted basis and safe rebuy date for the trades you send","x-payment-info":{"price":{"amount":"0.010000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}},"post":{"description":"Wash sales (US): would buying or selling this stock today wash a loss? Applies IRC 1091 to the trades you send, across taxable, IRA and spouse accounts: disallowed loss, adjusted basis, safe rebuy date, realized gains by year. BasisScout","operationId":"basis_post","parameters":[{"description":"Your trades: rows account,account_type,date,symbol,kind,quantity,price[,fees] separated by ';' (account_type: taxable, trad_ira, roth_ira, spouse_taxable, spouse_ira; kind: buy, sell, reinvest, stock_plan_acquire; dates YYYY-MM-DD), or a JSON array of objects with those field names and an optional id. Rows are named t1, t2, ... in the order sent unless the JSON names them. At most 500 rows.","example":"fid,taxable,2026-08-01,PLTR,buy,100,10;fid,taxable,2026-09-03,PLTR,sell,100,8","in":"query","name":"trades","required":true,"schema":{"examples":["fid,taxable,2026-08-01,PLTR,buy,100,10;fid,taxable,2026-09-03,PLTR,sell,100,8"],"type":"string"}},{"description":"The pre-trade question: buy (would buying symbol on this date disallow a loss already taken?) or sell (if quantity were sold at a loss from account on this date, how much is already washed?). Leave out for the ledger alone: determinations, sales and the year's totals.","example":"buy","in":"query","name":"check","required":false,"schema":{"examples":["buy"],"type":"string"}},{"description":"The ticker the question is about, as it appears in trades. Required with check.","example":"PLTR","in":"query","name":"symbol","required":false,"schema":{"examples":["PLTR"],"type":"string"}},{"description":"The date of the proposed trade, YYYY-MM-DD. Default: today (UTC).","example":"2026-09-20","in":"query","name":"on","required":false,"schema":{"examples":["2026-09-20"],"type":"string"}},{"description":"check=buy: where the purchase would be. A purchase in an IRA disallows the loss permanently.","in":"query","name":"account_type","required":false,"schema":{"default":"taxable","enum":["taxable","trad_ira","roth_ira","spouse_taxable","spouse_ira"],"type":"string"}},{"description":"check=sell: the account the shares would be sold from, as named in trades. Required with check=sell.","in":"query","name":"account","required":false,"schema":{"type":"string"}},{"description":"check=sell: how many shares would be sold. Required with check=sell.","in":"query","name":"quantity","required":false,"schema":{"type":"number"}},{"description":"The tax year year_summary totals. Default: the year of `on` with a check, otherwise the year of the latest trade.","in":"query","name":"year","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"kind":"wash_sale_check","trades_received":2,"check":{"action":"buy","symbol":"PLTR","on":"2026-09-20","account_type":"TAXABLE","safe":false,"safe_date":"2026-10-04","max_disallowed":"200.00","permanent":false,"windows":[{"sale_id":"t2","sale_date":"2026-09-03","account":"fid","shares_washable":"100","loss_per_share":"2","max_disallowed":"200.00","safe_date":"2026-10-04"}],"statement":"Buying PLTR before Oct 4, 2026 disallows $200.00 from your Sep 3, 2026 sale in fid. Safe to rebuy Oct 4, 2026. The disallowed loss would be added to the new shares' basis, not destroyed."},"determinations":[],"sales":[{"sale_id":"t2","date":"2026-09-03","account":"fid","symbol":"PLTR","quantity":"100","realized":"-200.00","disallowed":"0.00","allowed":"-200.00","short_term":"-200.00","long_term":"0.00","in_ira":false}],"year_summary":{"year":2026,"realized":"-200.00","short_term":"-200.00","long_term":"0.00","disallowed_total":"0.00","disallowed_permanent":"0.00","allowed":"-200.00"},"open_lots":[],"errors":[],"scope":"US federal wash-sale rule only, matched on the same ticker across every account sent (taxable, traditional and Roth IRA, spouse). Not modelled: options on the same underlying, short sales, stock splits, \"substantially identical\" pairs (share classes, similar ETFs) and digital assets, to which the rule does not currently apply. FIFO lot matching. Trade dates, not settlement dates.","privacy":"The trades you send are processed in memory for this response only. They are not stored, not logged and not shared.","source":"Rule: Internal Revenue Code section 1091 and IRS Publication 550, Investment Income and Expenses (Wash Sales). The calculation is BasisScout's own.","attribution":{"lines":["The wash-sale rule applied here is Internal Revenue Code section 1091, in the form IRS Publication 550 describes it (a US Government work in the public domain).","BasisScout is not affiliated with or endorsed by the IRS or by any broker."],"sources":[{"name":"Internal Revenue Code section 1091 and IRS Publication 550, Investment Income and Expenses (Wash Sales)","licence":"Public domain (U.S. Government work)","licence_url":"https://www.usa.gov/government-copyright","url":"https://www.irs.gov/publications/p550"}],"text":"The wash-sale rule applied here is Internal Revenue Code section 1091, in the form IRS Publication 550 describes it (a US Government work in the public domain).\nBasisScout is not affiliated with or endorsed by the IRS or by any broker."},"disclaimer":"BasisScout is a record-keeping calculation, not tax advice. It applies the US wash-sale rule (IRC section 1091) to the trades you send, using same-ticker matching only. It cannot see trades you did not send, cannot decide whether two different securities are \"substantially identical\", and does not know your full tax situation. Confirm results with a tax professional before relying on them. BasisScout is not affiliated with any broker or with the IRS.","receipt":"example"},"schema":{"properties":{"attribution":{"description":"The rule this calculation applies and where it is published, then the line that BasisScout is not affiliated with the IRS or any broker. Show every line verbatim with the result.","properties":{"lines":{"description":"The same credit lines, verbatim and in order.","items":{"type":"string"},"type":"array"},"sources":{"description":"One entry per data source the answer rests on.","items":{"properties":{"licence":{"description":"The licence or terms the data is reused under.","type":"string"},"licence_url":{"description":"Where that licence is published, when it has a URL.","type":"string"},"name":{"description":"The source, as it asks to be named.","type":"string"},"url":{"description":"The source's own site.","type":"string"}},"type":"object"},"type":"array"},"text":{"description":"The credit lines joined with newlines: show it verbatim with the data.","type":"string"}},"type":"object"},"check":{"description":"The pre-trade answer; present when check was asked.","properties":{"account":{"description":"check=sell: the selling account.","type":"string"},"account_type":{"description":"check=buy: where the purchase would be.","type":"string"},"action":{"description":"buy or sell.","type":"string"},"max_disallowed":{"description":"A dollar amount with two decimals, as a string. buy, when not safe: the most the purchase could disallow, over every open window.","type":"string"},"on":{"description":"YYYY-MM-DD.","type":"string"},"permanent":{"description":"The loss would be lost permanently rather than deferred: the buy would be in an IRA, or a replacement purchase is.","type":"boolean"},"quantity":{"description":"A share quantity, as a plain decimal string. check=sell.","type":"string"},"replacements":{"description":"sell, when not safe: every purchase that would wash it.","items":{"description":"One purchase in the 30 days before `on` that would wash the sale.","properties":{"account":{"type":"string"},"date":{"description":"YYYY-MM-DD.","type":"string"},"permanent":{"description":"The purchase is in an IRA: the loss on those shares would be lost, not deferred.","type":"boolean"},"shares":{"description":"A share quantity, as a plain decimal string. How many of its shares can still serve as replacements.","type":"string"},"trade_id":{"type":"string"}},"type":"object"},"type":"array"},"safe":{"description":"buy: no loss sale of this ticker in the 30 days before `on` has unwashed shares. sell: no purchase in the 30 days before `on` would wash the sale. Among the trades sent; not a recommendation.","type":"boolean"},"safe_date":{"description":"YYYY-MM-DD. buy, when not safe: the first day a purchase washes nothing.","type":"string"},"statement":{"description":"The answer in a sentence, stating the rule calculation. Show it verbatim.","type":"string"},"symbol":{"type":"string"},"washable_shares":{"description":"A share quantity, as a plain decimal string. sell: how many of the shares' loss is already washed by earlier purchases.","type":"string"},"windows":{"description":"buy, when not safe: every open window.","items":{"description":"One loss sale a purchase on `on` would wash.","properties":{"account":{"type":"string"},"loss_per_share":{"description":"The loss per share on those shares.","type":"string"},"max_disallowed":{"description":"A dollar amount with two decimals, as a string. The most a purchase could disallow from this sale.","type":"string"},"safe_date":{"description":"YYYY-MM-DD. The first day a purchase no longer washes this sale.","type":"string"},"sale_date":{"description":"YYYY-MM-DD.","type":"string"},"sale_id":{"description":"The loss sale, by trade id.","type":"string"},"shares_washable":{"description":"A share quantity, as a plain decimal string. How many of its loss shares are still unwashed.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"determinations":{"description":"Every disallowance in the trades sent, in replay order.","items":{"description":"One disallowance: this many shares of that loss sale were washed by this purchase.","properties":{"basis_adjusted_qty":{"description":"A share quantity, as a plain decimal string. Shares whose basis rose by the disallowed loss (0 when permanent).","type":"string"},"disallowed":{"description":"A dollar amount with two decimals, as a string.","type":"string"},"loss_sale_id":{"type":"string"},"permanent":{"description":"Replacement in an IRA: no basis adjustment, loss gone.","type":"boolean"},"replacement_account":{"type":"string"},"replacement_trade_id":{"type":"string"},"shares_washed":{"description":"A share quantity, as a plain decimal string.","type":"string"},"window_end":{"description":"YYYY-MM-DD.","type":"string"},"window_start":{"description":"YYYY-MM-DD.","type":"string"}},"type":"object"},"type":"array"},"disclaimer":{"type":"string"},"errors":{"description":"Rows the rule could not apply to, by trade id: a sale of more than the account held (capped at the holding), an unsupported kind, a non-positive quantity. Never silently dropped.","items":{"type":"string"},"type":"array"},"kind":{"description":"wash_sale_check.","type":"string"},"open_lots":{"description":"Every open lot after the replay.","items":{"description":"An open lot after the replay, with the basis and holding date it now carries.","properties":{"account":{"type":"string"},"acquisition_id":{"description":"The purchase it came from.","type":"string"},"adjusted":{"description":"These shares absorbed a disallowed loss.","type":"boolean"},"basis_per_share":{"description":"Six decimals; includes fees and any disallowed loss added.","type":"string"},"holding_date":{"description":"YYYY-MM-DD. The date the holding period runs from, after any tacking.","type":"string"},"quantity":{"description":"A share quantity, as a plain decimal string.","type":"string"},"symbol":{"type":"string"}},"type":"object"},"type":"array"},"privacy":{"description":"What happens to the trades sent: nothing.","type":"string"},"receipt":{"description":"The payment receipt, echoed.","type":"string"},"sales":{"description":"Every sale, in replay order.","items":{"description":"One sale, FIFO against the account's lots.","properties":{"account":{"type":"string"},"allowed":{"description":"A dollar amount with two decimals, as a string. realized plus disallowed.","type":"string"},"date":{"description":"YYYY-MM-DD.","type":"string"},"disallowed":{"description":"A dollar amount with two decimals, as a string.","type":"string"},"in_ira":{"description":"A sale inside an IRA is not a taxable event and is left out of year_summary.","type":"boolean"},"long_term":{"description":"A dollar amount with two decimals, as a string. The realized figure on shares held more than one year, counting any tacked holding period.","type":"string"},"quantity":{"description":"A share quantity, as a plain decimal string.","type":"string"},"realized":{"description":"A dollar amount with two decimals, as a string. Gain (negative = loss) before wash-sale adjustment, net of fees.","type":"string"},"sale_id":{"type":"string"},"short_term":{"description":"A dollar amount with two decimals, as a string. The realized figure on shares held one year or less.","type":"string"},"symbol":{"type":"string"}},"type":"object"},"type":"array"},"scope":{"description":"What the calculation covers and leaves out.","type":"string"},"source":{"type":"string"},"trades_received":{"type":"integer"},"year_summary":{"description":"The tax year's totals, IRA sales excluded.","properties":{"allowed":{"description":"A dollar amount with two decimals, as a string. realized plus disallowed_total.","type":"string"},"disallowed_permanent":{"description":"A dollar amount with two decimals, as a string. The part lost for good (IRA replacements).","type":"string"},"disallowed_total":{"description":"A dollar amount with two decimals, as a string. Disallowances whose loss sale fell in this year.","type":"string"},"long_term":{"description":"A dollar amount with two decimals, as a string.","type":"string"},"realized":{"description":"A dollar amount with two decimals, as a string.","type":"string"},"short_term":{"description":"A dollar amount with two decimals, as a string.","type":"string"},"year":{"type":"integer"}},"type":"object"}},"type":"object"}}},"description":"The paid result, returned once the payment has settled."},"400":{"description":"A malformed payment header, or parameters this service cannot answer. Checked BEFORE anything settles, so nothing is charged; fix the request and pay a fresh quote."},"402":{"content":{"application/json":{"schema":{"properties":{"accepts":{"items":{"properties":{"amount":{"description":"atomic units of the asset (USDC 0.01 = 10000)","type":"string"},"asset":{"type":"string"},"extra":{"type":"object"},"maxTimeoutSeconds":{"type":"integer"},"network":{"description":"CAIP-2, e.g. eip155:8453 (Base) or xrpl:0","type":"string"},"payTo":{"type":"string"},"scheme":{"type":"string"}},"required":["scheme","network","amount","asset","payTo"],"type":"object"},"type":"array"},"error":{"type":"string"},"extensions":{"type":"object"},"resource":{"type":"object"},"x402Version":{"type":"integer"}},"required":["x402Version","accepts"],"type":"object"}}},"description":"Payment Required: an x402 v2 challenge. accepts[] lists every rail this path can be paid on; pay one and repeat the request with the payment in the PAYMENT-SIGNATURE header.","headers":{"PAYMENT-REQUIRED":{"description":"The same challenge, base64-encoded JSON.","schema":{"type":"string"}}}}},"security":[],"summary":"Wash sales (US): disallowed loss, adjusted basis and safe rebuy date for the trades you send (POST: the same call as GET, parameters in the query string)","x-payment-info":{"price":{"amount":"0.010000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/preview":{"get":{"operationId":"preview","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Coverage, parameters, price and example calls."}},"security":[],"summary":"Free preview of BasisScout: what the paid endpoint returns, its parameters, price and example calls. No payment."}}},"servers":[{"url":"https://basisscout.scalpstream.com"}],"x-agentcash-guidance":{"llmsTxtUrl":"https://basisscout.scalpstream.com/llms.txt"}}
