Set manual cost basis for a lot
PATCH
/api/wallets/{address}/lots/{lot_id}/cost-basis
const url = 'https://api.qeychain.xyz/api/wallets/example/lots/example/cost-basis?cost_per_unit=example&persist_async=true';const options = {method: 'PATCH'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url 'https://api.qeychain.xyz/api/wallets/example/lots/example/cost-basis?cost_per_unit=example&persist_async=true'Set the cost basis for a lot that was received from an external wallet.
Use this when you have records of the original purchase price from an exchange
(e.g., Coinbase, Kraken) but the on-chain data doesn't show it.
After setting the cost basis, all affected gain/loss calculations will be
automatically recalculated.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”address
required
Address
string
lot_id
required
Lot Id
string
Query Parameters
Section titled “Query Parameters”cost_per_unit
required
Cost Per Unit
Cost per unit in USD as string (e.g., ‘2500.00’ for ETH bought at $2,500)
string
Cost per unit in USD as string (e.g., ‘2500.00’ for ETH bought at $2,500)
acquisition_date
persist_async
Persist Async
Persist recalculated output asynchronously
boolean
Persist recalculated output asynchronously
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleBad Request
Not Found
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}Internal Server Error
