Update Transaction Cost Basis
curl --request PATCH \
--url https://api.anchorage-staging.com/v2/tax/transaction/{transactionId} \
--header 'Api-Access-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "DEPOSIT",
"acquisitionDatetime": "2023-11-07T05:31:56Z",
"assetType": "BTC",
"lots": [
{
"cost": "<string>",
"quantity": "<string>",
"acquisitionDatetime": "2023-11-07T05:31:56Z"
}
]
}
'import requests
url = "https://api.anchorage-staging.com/v2/tax/transaction/{transactionId}"
payload = {
"type": "DEPOSIT",
"acquisitionDatetime": "2023-11-07T05:31:56Z",
"assetType": "BTC",
"lots": [
{
"cost": "<string>",
"quantity": "<string>",
"acquisitionDatetime": "2023-11-07T05:31:56Z"
}
]
}
headers = {
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Api-Access-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'DEPOSIT',
acquisitionDatetime: '2023-11-07T05:31:56Z',
assetType: 'BTC',
lots: [
{
cost: '<string>',
quantity: '<string>',
acquisitionDatetime: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.anchorage-staging.com/v2/tax/transaction/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"transactionId": "9cd9f4d4-078b-4e44-a308-7662fec0f546"
}
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Update Transaction Cost Basis
Permissions required: Subaccount
Update the cost basis for a deposit or withdraw transaction.
PATCH
/
tax
/
transaction
/
{transactionId}
Update Transaction Cost Basis
curl --request PATCH \
--url https://api.anchorage-staging.com/v2/tax/transaction/{transactionId} \
--header 'Api-Access-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "DEPOSIT",
"acquisitionDatetime": "2023-11-07T05:31:56Z",
"assetType": "BTC",
"lots": [
{
"cost": "<string>",
"quantity": "<string>",
"acquisitionDatetime": "2023-11-07T05:31:56Z"
}
]
}
'import requests
url = "https://api.anchorage-staging.com/v2/tax/transaction/{transactionId}"
payload = {
"type": "DEPOSIT",
"acquisitionDatetime": "2023-11-07T05:31:56Z",
"assetType": "BTC",
"lots": [
{
"cost": "<string>",
"quantity": "<string>",
"acquisitionDatetime": "2023-11-07T05:31:56Z"
}
]
}
headers = {
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Api-Access-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'DEPOSIT',
acquisitionDatetime: '2023-11-07T05:31:56Z',
assetType: 'BTC',
lots: [
{
cost: '<string>',
quantity: '<string>',
acquisitionDatetime: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.anchorage-staging.com/v2/tax/transaction/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"transactionId": "9cd9f4d4-078b-4e44-a308-7662fec0f546"
}
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Authorizations
An API key associated with a security role
Path Parameters
The ID of the transaction to update (Same as the one returned for Transactions in the Subaccounts API )
Body
application/json
A string representing the type of the transaction. Must match the original transaction type.
Available options:
DEPOSIT, WITHDRAW Example:
"DEPOSIT"
ISO-8601 timestamp representing when the lot was acquired.
A string representing the asset type of the transaction.
Example:
"BTC"
Details of the transaction cost basis
Show child attributes
Show child attributes
An Array of the Tax lots that are part of this transaction
Minimum array length:
1Show child attributes
Show child attributes
Response
Successfully updated the transaction
Show child attributes
Show child attributes
Was this page helpful?