# Crypto.com

> Read Crypto.com Exchange market data, orders, trades, positions, balances and account history.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/crypto-com

## Actions

### Get account settings

Get account settings.

**Inputs**: None.

**Outputs**: Response.

- `data` (object): Response for private/get-account-settings (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get candlesticks

Get candlesticks.

**Inputs**

- Instrument name (`instrument_name`, text, required): Instrument symbol, e.g. BTCUSD-PERP
- Timeframe (`timeframe`, text): The period value. Default **1m**. One of: `1m` (1 minute), `5m` (5 minutes), `15m` (15 minutes), `30m` (30 minutes), `1h` (1 hour), `2h` (2 hours), `4h` (4 hours), `12h` (12 hours), `1D` (1 day), `7D` (7 days), `14D` (14 days), `1M` (1 month).
- Count (`count`, number): Number of candles to return. Default 25. At least 1.
- Start ts (`start_ts`, date and time): Start time (Unix timestamp). Default 1 day ago.
- End ts (`end_ts`, date and time): End time (Unix timestamp). Default current time.

**Outputs**: Response.

- `data` (object): Response for public/get-candlestick (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": [],
      "instrument_name": "example",
      "interval": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get currency networks

Get currency networks.

**Inputs**: None.

**Outputs**: Response.

- `data` (object): Response for private/get-currency-networks (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "currency_map": {},
      "update_time": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get deposit history

Get deposit history.

**Inputs**

- Currency (`currency`, text): E.g. BTC, CRO.
- Start ts (`start_ts`, date and time): Start time (ms), e.g. "1771761038000". Default is 90 days from current timestamp.
- End ts (`end_ts`, date and time): End time (ms), e.g. "1771761038000". Default is current timestamp.
- Page size (`page_size`, number): Page size (Default: 20, Max: 200). At least 1.
- Page (`page`, number): Page number (0-based). At least 0.
- Status (`status`, text): Deposit status. Used in private/get-deposit-history request (filter) and response (deposit_list[].status). - ➖ 0: Not Arrived - ➖ 1: Arrived - ➖ 2: Failed - ➖ 3: Pending. One of: `0`, `1`, `2`, `3`.

**Outputs**: Response.

- `data` (object): Response for private/get-deposit-history (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "deposit_list": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get fee rate

Get fee rate.

**Inputs**: None.

**Outputs**: Response.

- `data` (object): Response for private/get-fee-rate (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "deriv_tier": "example",
      "effective_deriv_maker_rate_bps": "example",
      "effective_deriv_taker_rate_bps": "example",
      "effective_spot_maker_rate_bps": "example",
      "effective_spot_taker_rate_bps": "example",
      "spot_tier": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get instrument fee rate

Get instrument fee rate.

**Inputs**

- Instrument name (`instrument_name`, text, required): E.g. BTC_USD, BTCUSD-PERP.

**Outputs**: Response.

- `data` (object): Response for private/get-instrument-fee-rate (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "effective_maker_rate_bps": "example",
      "effective_taker_rate_bps": "example",
      "instrument_name": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get insurance

Get insurance.

**Inputs**

- Instrument name (`instrument_name`, text, required): e.g. USD
- Count (`count`, number): Default is 25. At least 1.
- Start ts (`start_ts`, date and time): Default timestamp is 1 day ago (Unix timestamp).
- End ts (`end_ts`, date and time): Default timestamp is current time (Unix timestamp).

**Outputs**: Response.

- `data` (object): Response for public/get-insurance (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": [],
      "instrument_name": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get open orders

Get open orders.

**Inputs**

- Instrument name (`instrument_name`, text): E.g. BTCUSD-PERP. Omit for 'all'.

**Outputs**: Response.

- `data` (object): Response for private/get-open-orders (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get order book

Get order book.

**Inputs**

- Instrument name (`instrument_name`, text, required): Instrument symbol, e.g. BTCUSD-PERP
- Depth (`depth`, number, required): Number of bids and asks to return (up to 50). From 1 to 50.

**Outputs**: Response.

- `data` (object): Response for public/get-book (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": [],
      "depth": "example",
      "instrument_name": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get order detail

Get order detail.

**Inputs**

- Order id (`order_id`, text): Order ID. string format is highly recommended, especially for JavaScript client. If not provided, client_oid must be specified.
- Client oid (`client_oid`, text): Client Order ID. If not provided, order_id must be specified.

**Outputs**: Response.

- `data` (object): Response for private/get-order-detail (HTTP 200). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "account_id": "example",
      "attach_isolation_id": "example",
      "attach_order_id": "example",
      "avg_price": "example",
      "client_oid": "example",
      "contingency_type": "OCO",
      "create_time": "example",
      "create_time_ns": "example",
      "cumulative_fee": "example",
      "cumulative_quantity": "example",
      "cumulative_value": "example",
      "exchange_order_id": "example",
      "exec_inst": [],
      "fee_instrument_name": "example",
      "instrument_name": "example",
      "isolated_margin_amount": "example",
      "isolation_id": "example",
      "isolation_type": "ISOLATED_MARGIN",
      "leg_id": "example",
      "leverage": 1,
      "limit_price": "example",
      "list_id": "example",
      "maker_fee_rate": "example",
      "order_date": "example",
      "order_id": "example",
      "order_type": "LIMIT",
      "order_value": "example",
      "quantity": "example",
      "reason": "example",
      "ref_price": "example",
      "ref_price_type": "MARK_PRICE",
      "reject_reason": "example",
      "side": "BUY",
      "status": "PENDING",
      "taker_fee_rate": "example",
      "time_in_force": "GOOD_TILL_CANCEL",
      "update_time": "example",
      "update_user_id": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get order history

Get order history.

**Inputs**

- Instrument name (`instrument_name`, text): instrument_name
- Start time (`start_time`, date and time): Start time (ms or ns).
- End time (`end_time`, date and time): End time (ms or ns).
- Limit (`limit`, number): Maximum number of orders to retrieve. Default: 100. At least 1.
- Isolation id (`isolation_id`, text): isolation_id

**Outputs**: Response.

- `data` (object): Response for private/get-order-history (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get positions

Get positions.

**Inputs**

- Instrument name (`instrument_name`, text): E.g. BTCUSD-PERP. Omit for 'all'.

**Outputs**: Response.

- `data` (object): Response for private/get-positions (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get tickers

Get tickers.

**Inputs**

- Instrument name (`instrument_name`, text): e.g. BTCUSD-PERP

**Outputs**: Response.

- `data` (object): Response for public/get-tickers (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get trades

Get trades.

**Inputs**

- Instrument name (`instrument_name`, text): E.g. BTCUSD-PERP. Omit for 'all'.
- Start time (`start_time`, date and time): Start time in Unix time format (inclusive), ms or ns. Default: end_time - 1 day. Nanosecond recommended for accurate pagination.
- End time (`end_time`, date and time): End time in Unix time format (exclusive), ms or ns. Default: current system timestamp. Nanosecond recommended for accurate pagination.
- Limit (`limit`, number): Maximum number of trades to retrieve before end_time. Default: 100. Max: 100. At least 1.
- Isolation id (`isolation_id`, text): Optional filter for trades of a particular isolated position. Omit for 'all'.

**Outputs**: Response.

- `data` (object): Response for private/get-trades (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get transactions

Get transactions.

**Inputs**

- Instrument name (`instrument_name`, text): E.g. BTCUSD-PERP. Omit for 'all'.
- Journal type (`journal_type`, text): Filter by journal type. E.g. TRADING, TRADE_FEE, ... One of: `TRADING`, `TRADE_FEE`, `ONCHAIN_WITHDRAWAL`, `ONCHAIN_DEPOSIT`, `FUNDING`, `REALIZED_PNL`, `INSURANCE_FUND`, `SOCIALIZED_LOSS`, `LIQUIDATION_FEE`, `SESSION_RESET`, and 11 more.
- Start time (`start_time`, date and time): Start time in Unix time format (inclusive), ms or ns. Default: end_time - 1 day. Nanosecond recommended for accurate pagination.
- End time (`end_time`, date and time): End time in Unix time format (exclusive), ms or ns. Default: current system timestamp. Nanosecond recommended for accurate pagination.
- Limit (`limit`, number): Maximum number of transactions to retrieve before end_time. Default: 100. Max: 100. At least 1.
- Isolation id (`isolation_id`, text): Optional filter for transactions of a particular isolated position. Omit for 'all'.

**Outputs**: Response.

- `data` (object): Response for private/get-transactions (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get user balance

Get user balance.

**Inputs**: None.

**Outputs**: Response.

- `data` (object): Data.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get valuations

Get valuations.

**Inputs**

- Instrument name (`instrument_name`, text, required): e.g. BTCUSD-INDEX
- Valuation type (`valuation_type`, text, required): **List of available types:** - a. **index_price**: returns per minute data of underlying reference price of the instrument. - b. **mark_price**: returns per minute data of mark price of the instrument. - c. **funding_hist**: returns hourly data of the funding rate settled in past hourly settlement. - d. **funding_rate**: returns per minute data of current hourly funding rate that will settle at the end of each hour of current 4-hour interval. - e. One of: `index_price`, `mark_price`, `funding_hist`, `funding_rate`, `estimated_funding_rate`.
- Count (`count`, number): Default is 25. At least 1.
- Start ts (`start_ts`, date and time): Default timestamp is 30 days ago for funding_hist, and 1 day ago for other valuation_type (Unix timestamp).
- End ts (`end_ts`, date and time): Default timestamp is current time (Unix timestamp).

**Outputs**: Response.

- `data` (object): Response for public/get-valuations (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": [],
      "instrument_name": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get withdrawal history

Get withdrawal history.

**Inputs**

- Currency (`currency`, text): E.g. BTC, CRO.
- Start ts (`start_ts`, date and time): Start time (ms). Default is 90 days before current timestamp.
- End ts (`end_ts`, date and time): End time (ms). Default is current timestamp.
- Page size (`page_size`, number): Page size (Default: 20, Max: 200). At least 1.
- Page (`page`, number): Page number (0-based). At least 0.
- Status (`status`, text): Withdrawal status. Used in private/get-withdrawal-history request (filter) and response (withdrawal_list[].status). - ➖ 0: Pending - ➖ 1: Processing - ➖ 2: Rejected - ➖ 3: Payment In-progress - ➖ 4: Payment Failed - ➖ 5: Completed - ➖ 6: Cancelled. One of: `0`, `1`, `2`, `3`, `4`, `5`, `6`.

**Outputs**: Response.

- `data` (object): Response for private/get-withdrawal-history (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "withdrawal_list": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List instruments

List instruments.

**Inputs**

- Event symbols (`event_symbols`, text): Filter by up to 10 event symbols. Comma-separated.
- Is combo (`is_combo`, true/false): Filter for combo instruments.
- Predict contract type (`PREDICT_CONTRACT_TYPE`, text): Filter by predict contract type.

**Outputs**: Response.

- `data` (object): Response for public/get-instruments (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": [],
      "next_cursor": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List market trades

List market trades.

**Inputs**

- Instrument name (`instrument_name`, text, required): e.g. BTCUSD-PERP
- Count (`count`, number): The maximum number of trades to be retrieved. Default: 25. Max: 150. At least 1.
- Start ts (`start_ts`, date and time): Start time in Unix time format (inclusive). Default: end_time - 1 day. Nanosecond recommended for accurate pagination
- End ts (`end_ts`, date and time): End time in Unix time format (exclusive). Default: current system timestamp. Nanosecond recommended for accurate pagination

**Outputs**: Response.

- `data` (object): Response for public/get-trades (HTTP 200/4xx/5xx). code === 0 → success, result present. code !== 0 → error, message and/or original present.
- `has_more` (true/false): Whether more records are available.
- `next_cursor` (text): Continuation token, if another page exists.

**Example output**

```json
{
  "data": {
    "code": "0",
    "id": "example",
    "message": "example",
    "method": "example",
    "original": "example",
    "result": {
      "data": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```
