Creating Inventory

Posting Transactions

Create a new transaction by issuing a POST request to the /v1/transactions/external-id endpoint. For example, the following TRADE request represents the purchase of one (1) bitcoin for $20,000 plus a $5 fee:

curl --request POST \
  --url https://api.multi1.enterprise.taxbit.com/v1/transactions/external-id \
  --header 'authorization: Bearer {{token}}' \
  --header 'content-type: application/json' \
  --data '{
    "account_id": "{{account_id}}",
    "id": "1",
    "datetime": "2024-01-01T12:13:14.123Z",
    "type": "trade",
    "fees": [
        {
            "asset_amount": {
                "amount": "5.00",
                "asset": {
                    "code": "USD",
                    "type": "fiat"
                }
            },
            "rates": [
                {
                    "amount": "1.00",
                    "asset": {
                        "code": "USD",
                        "type": "fiat"
                    }
                }
            ]
        }
    ],
    "received": [
        {
            "asset_amount": {
                "amount": "1.00",
                "asset": {
                    "code": "BTC",
                    "type": "crypto"
                }
            },
            "rates": [
                {
                    "amount": "20000.00",
                    "asset": {
                        "code": "USD",
                        "type": "fiat"
                    }
                }
            ]
        }
    ],
    "sent": [
        {
            "asset_amount": {
                "amount": "20000.00",
                "asset": {
                    "code": "USD",
                    "type": "fiat"
                }
            },
            "rates": [
                {
                    "amount": "1.00",
                    "asset": {
                        "code": "USD",
                        "type": "fiat"
                    }
                }
            ]
        }
    ],
    "version": "2.0"
}'