Cryptocurrency P&L

Endpoints


Calculator API

Crypto Tax P&L (Submit Job)

reportfromtoResponseRemark
tradewise16829456140001682945614000200The job will be successful
tradewise16829456140001683291214000422The job will fail with the message: Invalid report: tradewize
{
	"@entity": "workbook",
    "name": "tradebook_workbook",
	"sheets": [
		{
			"name": "crypto_currency_spot_tradebook_sheet",
			"@entity": "sheet",
			"blocks": [
				{
					"name": "crypto_currency_spot_tradebook_table",
					"@entity": "table",
					"header": ["id", "date_epoch", "transaction_type", "label", "received_currency", "received_quantity", "price", "price_currency", "price_in_inr", "sent_currency", "sent_quantity", "fee_currency", "fee_amount", "fee_in_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],
						["hjdj0plsejw3n227890c", 1687824000000, "buy", null, "USDT", 15.9965, 83.99, "INR", 1343.5460349999998, null, null, "INR", 100, 100],
						["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.3595999999999997, 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],
						["jowfeo234r4gjko454sse3", 1706572800000, "buy", null, "USDT", 9.3568, 89.845, "INR", 840.661696, null, null, null, null, null],
						["rfgt3t2r5jykykrelmcdfgh2", 1706572800000, "sell", null, null, null, 92.3654, "INR", 1704.93597244, "USDT", 18.4586, null, null, null],
						["efvdf3vmndvnor349023s", 1711843200000, "buy", null, "SOL", 2000, 0.3117, "INR", 623.4, null, null, null, null, null]
					]
				},
				{
					"name": "crypto_currency_spot_last_traded_price_list",
					"@entity": "list",
					"items": [
						["cryptocurrency_name", "last_traded_price"],
						["BTC", 299.785],
						["USDT", 95.45],
						["XRP", 38.45],
						["SOL", 0.0145],
						["ETH", 89.566],
						["MATIC", 1256.789]
					]
				}
			]
		},
		{
			"name": "crypto_currency_future_tradebook_sheet",
			"@entity": "sheet",
			"blocks": [
				{
					"name": "crypto_currency_future_tradebook_table",
					"@entity": "table",
					"header": ["id", "contract_name", "date_epoch", "transaction_type", "quantity", "price", "price_currency", "price_in_inr", "fee_amount", "fee_currency", "fee_in_inr"],
					"rows": []
				},
				{ "name": "crypto_currency_future_last_traded_price_list", "@entity": "list", "items": [["contract_name", "last_traded_price"]] }
			]
		}
	]
}
{
    "@entity": "workbook",
	"name": "tradebook_workbook",
    "sheets": [
        {
            "name": "crypto_currency_spot_tradebook_sheet",
            "@entity": "sheet",
            "blocks": [
                {
                    "name": "crypto_currency_spot_tradebook_table",
                    "@entity": "table",
                    "header": [
                        "id",
                        "date_epoch",
                        "transaction_type",
                        "label",
                        "received_currency",
                        "received_quantity",
                        "price",
                        "price_currency",
                        "price_in_inr",
                        "sent_currency",
                        "sent_quantity",
                        "fee_currency",
                        "fee_amount",
                        "fee_in_inr"
                    ],
                    "rows": [
                        [
                            "acdcwefew3e1113vcd",
                            1682985600000,
                            "buy",
                            null,
                            "USDT",
                            350,
                            84.311,
                            "INR",
                            29508.850000000002,
                            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": "crypto_currency_spot_last_traded_price_list",
                    "@entity": "list",
                    "items": [
                        [
                            "cryptocurrency_name",
                            "last_traded_price"
                        ],
                        [
                            "BTC",
                            299.785
                        ],
                        [
                            "USDT",
                            95.45
                        ],
                        [
                            "XRP",
                            38.45
                        ],
                        [
                            "SOL",
                            0.0145
                        ],
                        [
                            "ETH",
                            89.566
                        ],
                        [
                            "MATIC",
                            1256.789
                        ]
                    ]
                }
            ]
        },
        {
            "name": "crypto_currency_future_tradebook_sheet",
            "@entity": "sheet",
            "blocks": [
                {
                    "name": "crypto_currency_future_tradebook_table",
                    "@entity": "table",
                    "header": [
                        "id",
                        "contract_name",
                        "date_epoch",
                        "transaction_type",
                        "quantity",
                        "price",
                        "price_currency",
                        "price_in_inr",
                        "fee_amount",
                        "fee_currency",
                        "fee_in_inr",
                        null,
                        null,
                        null
                    ],
                    "rows": [
                        [
                            "addf3434mkvefv456h",
                            "BTC-USDT",
                            1687219200000,
                            "buy",
                            1,
                            70,
                            "USDT",
                            5901.77,
                            1000,
                            "INR",
                            1000,
                            null,
                            20,
                            20
                        ],
                        [
                            "fege4343gbgee344tg",
                            "BTC-USDT",
                            1687305600000,
                            "sell",
                            1,
                            110,
                            "USDT",
                            9350,
                            400,
                            "INR",
                            400,
                            null,
                            100,
                            100
                        ],
                        [
                            "fhtyjrg35n788985gff3",
                            "ETH-USDT",
                            1690934400000,
                            "buy",
                            3,
                            160,
                            "USDT",
                            14640,
                            500,
                            "INR",
                            500,
                            null,
                            10.4564,
                            10.4564
                        ],
                        [
                            "fhtyjrg35n788985gff4",
                            "XRP-USDT",
                            1691020800000,
                            "buy",
                            2,
                            65,
                            "USDT",
                            5742.75,
                            233,
                            "INR",
                            233,
                            null,
                            null,
                            null
                        ],
                        [
                            "fhtyjrg35n788985gff5",
                            "ETH-USDT",
                            1694131200000,
                            "sell",
                            3,
                            110,
                            "USDT",
                            9790,
                            null,
                            null,
                            null,
                            null,
                            null,
                            null
                        ]
                    ]
                },
                {
                    "name": "crypto_currency_future_last_traded_price_list",
                    "@entity": "list",
                    "items": [
                        [
                            "contract_name",
                            "last_traded_price"
                        ],
                        [
                            "BTC-USDT",
                            145
                        ],
                        [
                            "XRP-USDT",
                            85
                        ]
                    ]
                }
            ]
        }
    ]
}
{
	"@entity": "workbook",
    "name": "tradebook_workbook",
	"sheets": [
		{
			"name": "crypto_currency_spot_tradebook_sheet",
			"@entity": "sheet",
			"blocks": [
				{
					"name": "crypto_currency_spot_tradebook_table",
					"@entity": "table",
					"header": ["id", "date_epoch", "transaction_type", "label", "received_currency", "received_quantity", "price", "price_currency", "price_in_inr", "sent_currency", "sent_quantity", "fee_currency", "fee_amount", "fee_in_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.3595999999999997, 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, null, 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.850000000002, 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": "crypto_currency_spot_last_traded_price_list",
					"@entity": "list",
					"items": [
						["cryptocurrency_name", "last_traded_price"],
						["BTC", 299.785],
						["USDT", 95.45],
						["XRP", 38.45],
						["SOL", 0.0145],
						["ETH", 89.566],
						["MATIC", 1256.789]
					]
				}
			]
		},
		{
			"name": "crypto_currency_future_tradebook_sheet",
			"@entity": "sheet",
			"blocks": [
				{
					"name": "crypto_currency_future_tradebook_table",
					"@entity": "table",
					"header": ["id", "contract_name", "date_epoch", "transaction_type", "quantity", "price", "price_currency", "price_in_inr", "fee_amount", "fee_currency", "fee_in_inr"],
					"rows": [
						["addf3434mkvefv456h", "BTC-USDT", 1687219200000, "buy", 1, 70, "USDT", 5901.77, 1000, "INR", 1000],
						["fege4343gbgee344tg", "BTC-USDT", 1687305600000, "sell", 1, 110, "USDT", 9350, 400, "INR", 400],
						["fhtyjrg35n788985gff3", "ETH-USDT", 1690934400000, "buy", 3, 160, "USDT", 14640, 500, "INR", 500],
						["fhtyjrg35n788985gff4", "XRP-USDT", 1691020800000, "buy", 2, 65, "USDT", 5742.75, 233, "INR", 233],
						["fhtyjrg35n788985gff5", "ETH-USDT", 1694131200000, "sell", 3, 110, "USDT", 9790, null, null, null]
					]
				},
				{
					"name": "crypto_currency_future_last_traded_price_list",
					"@entity": "list",
					"items": [
						["contract_name", "last_traded_price"],
						["BTC-USDT", 145],
						["XRP-USDT", 85]
					]
				}
			]
		}
	]
}

Crypto Tax P&L (Poll Job)

job_idResponseRemark
2aa54d2b-68f6-4871-866a-4eba957a8672200Job queued Response
c01f847c-c42e-4577-9d01-a7208401a922200Job succeeded Response
6e8d1908-c062-4846-a811-8f73054acd65200Job failed: Sell quantity is more than buy quantity for MATIC
7baed565-4dc2-46a1-89c2-be35a0a38081521Data not found
b7c37bd2-9c44-42fb-835f-87e292ab0936200Tradewise Pnl for a tradebook with just Crypto Futures (Response for Tradebook 2)
597c9587-ae3d-462f-8d27-e2e33a01facc200Tradewise PnL for a tradebook with Spot buy/sell (Response for Tradebook 1)
8af8d6ec-e333-432c-a022-5df9d625d5b9200Tradewise Pnl for a tradebook with comprehensive situation including spot, futures, and other crypto transactions. (Response for Tradebook 3)