curl --request POST \
--url https://api.sandbox.co.in/it/calculator/tax-pnl/crypto \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"@entity": "workbook",
"name": "crypto_currency_tradebook_workbook",
"sheets": [
{
"name": "spot_sheet",
"@entity": "sheet",
"blocks": [
{
"name": "spot_tradebook_table",
"@entity": "table",
"header": [
"id",
"date",
"transaction_type",
"label",
"received_currency",
"received_quantity",
"price",
"price_currency",
"price_inr",
"sent_currency",
"sent_quantity",
"fee_currency",
"fee_amount",
"fee_amount_inr"
],
"rows": [
[
"acdcwefew3e1113vcd",
1682985600000,
"buy",
null,
"BTC",
8.4567,
265,
"INR",
2241.0254999999997,
null,
null,
"INR",
20,
20
],
[
"nknee38ni9cd3defeve",
1687132800000,
"buy",
null,
"XRP",
9.0123,
58.68,
"INR",
528.841764,
null,
null,
"INR",
50,
50
],
[
"nrezxcetgf2334jk0333d",
1690416000000,
"sell",
null,
null,
null,
278.98,
"INR",
995.3532134000001,
"BTC",
3.56783,
"INR",
10.4564,
10.4564
],
[
"fwhjceco2trsc344f322e",
1690934400000,
"buy",
null,
"BTC",
10.9873,
309.8,
"INR",
3403.86554,
null,
null,
"INR",
288,
288
],
[
"fwhjceco2trsc344f322e",
1690934400000,
"sell",
null,
null,
null,
75.35,
"INR",
679.0768049999999,
"XRP",
6.3544,
"INR",
145.89,
145.89
],
[
"zxc1rtvmk3456hkkve3w",
1696291200000,
"sell",
null,
null,
null,
48.49,
"INR",
65.92700399999998,
"XRP",
1.3596,
null,
null,
null
],
[
"zxc1rtvmk3456hkkve3w",
1696291200000,
"sell",
null,
null,
null,
48.49,
"INR",
62.954567000000004,
"XRP",
1.2983,
null,
null,
null
],
[
"klop3sdcwf23445dwedc",
1594684800000,
"buy",
null,
"ETH",
0.9822,
120.455,
"INR",
118.31090099999999,
null,
null,
null,
null,
null
],
[
"klop3sdcwf2347d12wxbk",
1708646400000,
"sell",
null,
null,
null,
511.698,
"INR",
233.79481619999999,
"ETH",
0.4569,
null,
null,
null
],
[
"efvdf3vmndvnor349023s",
1711843200000,
"buy",
null,
"SOL",
2000,
0.3117,
"INR",
623.4,
null,
null,
null,
null,
null
],
[
"wg3rg43wfege1dbdg33f",
1687392000000,
"trade",
null,
"MATIC",
100,
2.45,
"SOL",
88.3669,
"SOL",
245,
null,
null,
null
],
[
"gjekbek45vdge32w3fegf",
1692057600000,
"send",
"staking",
null,
null,
null,
"INR",
560.456,
"MATIC",
50,
null,
null,
null
],
[
"egrgrbko4542gfvfg4gv332",
1693008000000,
"receive",
"staking_reward",
"MATIC",
12.568,
null,
null,
140.8762,
null,
null,
null,
null,
null
],
[
"efkpfemfpe45efrG3r32f2A",
1695859200000,
"receive",
"staking",
"MATIC",
50,
null,
null,
715.255,
null,
null,
null,
null,
null
],
[
"acdcwefew3e1113vcd",
1682985600000,
"buy",
null,
"USDT",
350,
84.311,
"INR",
29508.85,
null,
null,
"INR",
20,
20
],
[
"nknee38ni9cd3defeve",
1687132800000,
"sell",
null,
null,
null,
85.23,
"INR",
4261.5,
"USDT",
50,
"INR",
50,
50
],
[
"kyjrtgew45568efeg12ds",
1687219200000,
"send",
"margin",
null,
null,
84.311,
"INR",
5901.77,
"USDT",
70,
null,
null,
null
],
[
"hjdj0plsejw3n227890c",
1687824000000,
"receive",
"margin",
"USDT",
70,
84.311,
"INR",
5901.77,
null,
null,
null,
null,
null
],
[
"nrezxcetgf2334jk0333d",
1690416000000,
"receive",
"margin_gain",
"USDT",
40,
85,
"INR",
3400,
null,
null,
null,
null,
null
],
[
"fwhjceco2trsc344f322e",
1690934400000,
"send",
"margin",
"USDT",
null,
86.55,
"INR",
13848,
"USDT",
160,
null,
null,
null
],
[
"fwhjceco2trsc344f322e",
1691020800000,
"sell",
null,
null,
null,
88,
"INR",
8800,
"USDT",
100,
"INR",
145.89,
145.89
],
[
"zxc1rtvmk3456hkkve3w",
1691020800000,
"send",
"margin",
null,
null,
88.35,
"INR",
4417.5,
"USDT",
50,
null,
null,
null
],
[
"zxc1rtvmk3456hkkve3w",
1694131200000,
"receive",
"margin",
"USDT",
160,
86.55,
"INR",
13848,
null,
null,
null,
null,
null
],
[
"klop3sdcwf23445dwedc",
1694131200000,
"send",
"margin_loss",
null,
null,
89,
"INR",
4450,
"USDT",
50,
null,
null,
null
],
[
"klop3sdcwf2347d12wxbk",
1708646400000,
"sell",
null,
null,
null,
91.09,
"INR",
3643.6000000000004,
"USDT",
40,
null,
null,
null
]
]
},
{
"name": "spot_last_traded_price_table",
"@entity": "table",
"header": [
"symbol",
"currency",
"last_traded_price",
"last_traded_price_inr"
],
"rows": [
[
"BTC",
"INR",
299.785,
299.785
],
[
"USDT",
"INR",
95.45,
95.45
],
[
"XRP",
"INR",
38.45,
38.45
],
[
"SOL",
"INR",
0.0145,
0.0145
],
[
"ETH",
"INR",
89.566,
89.566
],
[
"MATIC",
"INR",
1256.789,
1256.789
]
]
}
]
},
{
"name": "future_sheet",
"@entity": "sheet",
"blocks": [
{
"name": "future_tradebook_table",
"@entity": "table",
"header": [
"id",
"contract_name",
"transaction_type",
"date",
"quantity",
"price",
"price_currency",
"price_inr",
"fee_amount",
"fee_currency",
"fee_amount_inr"
],
"rows": [
[
"addf3434mkvefv456h",
"BTC-USDT",
"buy",
1687219200000,
1,
70,
"USDT",
5901.77,
1000,
"INR",
1000
],
[
"fege4343gbgee344tg",
"BTC-USDT",
"sell",
1687305600000,
1,
110,
"USDT",
9350,
400,
"INR",
400
],
[
"fhtyjrg35n788985gff3",
"ETH-USDT",
"buy",
1690934400000,
3,
160,
"USDT",
14640,
500,
"INR",
500
],
[
"fhtyjrg35n788985gff4",
"XRP-USDT",
"buy",
1691020800000,
2,
65,
"USDT",
5742.75,
233,
"INR",
233
],
[
"fhtyjrg35n788985gff5",
"ETH-USDT",
"sell",
1694131200000,
3,
110,
"USDT",
9790,
null,
null,
null
]
]
},
{
"name": "future_last_traded_price_table",
"@entity": "table",
"header": [
"contract_name",
"currency",
"last_traded_price",
"last_traded_price_inr"
],
"rows": [
[
"BTC-USDT",
"USDT",
145,
145
],
[
"XRP-USDT",
"USDT",
85,
85
]
]
}
]
}
]
}
'{
"code": 200,
"timestamp": 1676979940157,
"transaction_id": "c01f847c-c42e-4577-9d01-a7208401a922",
"data": {
"@entity": "in.co.sandbox.it.calculator.cryto.tax_pnl.job",
"job_id": "c01f847c-c42e-4577-9d01-a7208401a922",
"report": "tradewise",
"from": 1682945614000,
"to": 1683291214000,
"status": "created",
"tradebook_url": "https://test-api.sandbox.co.in/it/calculator/in-co-sandbox-it-calculator-crypto-tax-pnl-dev/c01f847c-c42e-4577-9d01-a7208401a922.json"
}
}Create a crypto Taxβ―P&L calculation job by sending the report type, date window, and auth headers; the response returns a job_id, status, and the presigned tradebook_url youβll use to upload your payload before processing begins.
curl --request POST \
--url https://api.sandbox.co.in/it/calculator/tax-pnl/crypto \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"@entity": "workbook",
"name": "crypto_currency_tradebook_workbook",
"sheets": [
{
"name": "spot_sheet",
"@entity": "sheet",
"blocks": [
{
"name": "spot_tradebook_table",
"@entity": "table",
"header": [
"id",
"date",
"transaction_type",
"label",
"received_currency",
"received_quantity",
"price",
"price_currency",
"price_inr",
"sent_currency",
"sent_quantity",
"fee_currency",
"fee_amount",
"fee_amount_inr"
],
"rows": [
[
"acdcwefew3e1113vcd",
1682985600000,
"buy",
null,
"BTC",
8.4567,
265,
"INR",
2241.0254999999997,
null,
null,
"INR",
20,
20
],
[
"nknee38ni9cd3defeve",
1687132800000,
"buy",
null,
"XRP",
9.0123,
58.68,
"INR",
528.841764,
null,
null,
"INR",
50,
50
],
[
"nrezxcetgf2334jk0333d",
1690416000000,
"sell",
null,
null,
null,
278.98,
"INR",
995.3532134000001,
"BTC",
3.56783,
"INR",
10.4564,
10.4564
],
[
"fwhjceco2trsc344f322e",
1690934400000,
"buy",
null,
"BTC",
10.9873,
309.8,
"INR",
3403.86554,
null,
null,
"INR",
288,
288
],
[
"fwhjceco2trsc344f322e",
1690934400000,
"sell",
null,
null,
null,
75.35,
"INR",
679.0768049999999,
"XRP",
6.3544,
"INR",
145.89,
145.89
],
[
"zxc1rtvmk3456hkkve3w",
1696291200000,
"sell",
null,
null,
null,
48.49,
"INR",
65.92700399999998,
"XRP",
1.3596,
null,
null,
null
],
[
"zxc1rtvmk3456hkkve3w",
1696291200000,
"sell",
null,
null,
null,
48.49,
"INR",
62.954567000000004,
"XRP",
1.2983,
null,
null,
null
],
[
"klop3sdcwf23445dwedc",
1594684800000,
"buy",
null,
"ETH",
0.9822,
120.455,
"INR",
118.31090099999999,
null,
null,
null,
null,
null
],
[
"klop3sdcwf2347d12wxbk",
1708646400000,
"sell",
null,
null,
null,
511.698,
"INR",
233.79481619999999,
"ETH",
0.4569,
null,
null,
null
],
[
"efvdf3vmndvnor349023s",
1711843200000,
"buy",
null,
"SOL",
2000,
0.3117,
"INR",
623.4,
null,
null,
null,
null,
null
],
[
"wg3rg43wfege1dbdg33f",
1687392000000,
"trade",
null,
"MATIC",
100,
2.45,
"SOL",
88.3669,
"SOL",
245,
null,
null,
null
],
[
"gjekbek45vdge32w3fegf",
1692057600000,
"send",
"staking",
null,
null,
null,
"INR",
560.456,
"MATIC",
50,
null,
null,
null
],
[
"egrgrbko4542gfvfg4gv332",
1693008000000,
"receive",
"staking_reward",
"MATIC",
12.568,
null,
null,
140.8762,
null,
null,
null,
null,
null
],
[
"efkpfemfpe45efrG3r32f2A",
1695859200000,
"receive",
"staking",
"MATIC",
50,
null,
null,
715.255,
null,
null,
null,
null,
null
],
[
"acdcwefew3e1113vcd",
1682985600000,
"buy",
null,
"USDT",
350,
84.311,
"INR",
29508.85,
null,
null,
"INR",
20,
20
],
[
"nknee38ni9cd3defeve",
1687132800000,
"sell",
null,
null,
null,
85.23,
"INR",
4261.5,
"USDT",
50,
"INR",
50,
50
],
[
"kyjrtgew45568efeg12ds",
1687219200000,
"send",
"margin",
null,
null,
84.311,
"INR",
5901.77,
"USDT",
70,
null,
null,
null
],
[
"hjdj0plsejw3n227890c",
1687824000000,
"receive",
"margin",
"USDT",
70,
84.311,
"INR",
5901.77,
null,
null,
null,
null,
null
],
[
"nrezxcetgf2334jk0333d",
1690416000000,
"receive",
"margin_gain",
"USDT",
40,
85,
"INR",
3400,
null,
null,
null,
null,
null
],
[
"fwhjceco2trsc344f322e",
1690934400000,
"send",
"margin",
"USDT",
null,
86.55,
"INR",
13848,
"USDT",
160,
null,
null,
null
],
[
"fwhjceco2trsc344f322e",
1691020800000,
"sell",
null,
null,
null,
88,
"INR",
8800,
"USDT",
100,
"INR",
145.89,
145.89
],
[
"zxc1rtvmk3456hkkve3w",
1691020800000,
"send",
"margin",
null,
null,
88.35,
"INR",
4417.5,
"USDT",
50,
null,
null,
null
],
[
"zxc1rtvmk3456hkkve3w",
1694131200000,
"receive",
"margin",
"USDT",
160,
86.55,
"INR",
13848,
null,
null,
null,
null,
null
],
[
"klop3sdcwf23445dwedc",
1694131200000,
"send",
"margin_loss",
null,
null,
89,
"INR",
4450,
"USDT",
50,
null,
null,
null
],
[
"klop3sdcwf2347d12wxbk",
1708646400000,
"sell",
null,
null,
null,
91.09,
"INR",
3643.6000000000004,
"USDT",
40,
null,
null,
null
]
]
},
{
"name": "spot_last_traded_price_table",
"@entity": "table",
"header": [
"symbol",
"currency",
"last_traded_price",
"last_traded_price_inr"
],
"rows": [
[
"BTC",
"INR",
299.785,
299.785
],
[
"USDT",
"INR",
95.45,
95.45
],
[
"XRP",
"INR",
38.45,
38.45
],
[
"SOL",
"INR",
0.0145,
0.0145
],
[
"ETH",
"INR",
89.566,
89.566
],
[
"MATIC",
"INR",
1256.789,
1256.789
]
]
}
]
},
{
"name": "future_sheet",
"@entity": "sheet",
"blocks": [
{
"name": "future_tradebook_table",
"@entity": "table",
"header": [
"id",
"contract_name",
"transaction_type",
"date",
"quantity",
"price",
"price_currency",
"price_inr",
"fee_amount",
"fee_currency",
"fee_amount_inr"
],
"rows": [
[
"addf3434mkvefv456h",
"BTC-USDT",
"buy",
1687219200000,
1,
70,
"USDT",
5901.77,
1000,
"INR",
1000
],
[
"fege4343gbgee344tg",
"BTC-USDT",
"sell",
1687305600000,
1,
110,
"USDT",
9350,
400,
"INR",
400
],
[
"fhtyjrg35n788985gff3",
"ETH-USDT",
"buy",
1690934400000,
3,
160,
"USDT",
14640,
500,
"INR",
500
],
[
"fhtyjrg35n788985gff4",
"XRP-USDT",
"buy",
1691020800000,
2,
65,
"USDT",
5742.75,
233,
"INR",
233
],
[
"fhtyjrg35n788985gff5",
"ETH-USDT",
"sell",
1694131200000,
3,
110,
"USDT",
9790,
null,
null,
null
]
]
},
{
"name": "future_last_traded_price_table",
"@entity": "table",
"header": [
"contract_name",
"currency",
"last_traded_price",
"last_traded_price_inr"
],
"rows": [
[
"BTC-USDT",
"USDT",
145,
145
],
[
"XRP-USDT",
"USDT",
85,
85
]
]
}
]
}
]
}
'{
"code": 200,
"timestamp": 1676979940157,
"transaction_id": "c01f847c-c42e-4577-9d01-a7208401a922",
"data": {
"@entity": "in.co.sandbox.it.calculator.cryto.tax_pnl.job",
"job_id": "c01f847c-c42e-4577-9d01-a7208401a922",
"report": "tradewise",
"from": 1682945614000,
"to": 1683291214000,
"status": "created",
"tradebook_url": "https://test-api.sandbox.co.in/it/calculator/in-co-sandbox-it-calculator-crypto-tax-pnl-dev/c01f847c-c42e-4577-9d01-a7208401a922.json"
}
}Specifies the response format expected from the API. Use application/json for JSON responses or application/xlsx for Excel file downloads.application/xlsx
Indicates the version of the API you want to use. Ensures backward-compatible behavior.
Token for user-level authorization.
Was this page helpful?