Queries

The Cashramp Bot API provides read-only queries to fetch agent profile data and account information.

Endpoint: POST /cashramp/bot/graphql Auth: Authorization: Bearer {api_key} (agent API key)


Profile

query {
  profile {
    # AgentProfile fields
  }
}

Returns the authenticated agent's profile — includes balances, rates, settings, deposit/withdrawal stats, TOTP info, etc.


Order History

query {
  orderHistory(
    page: 1
    perPage: 10
    filter: {
      orderId: "order_id"
      status: completed
      dateFrom: "2024-01-01"
      dateTo: "2024-12-31"
      paymentMethod: "bank_transfer"
    }
  ) {
    data {
      # P2PPayment fields
    }
    pagination {
      # Pagination fields
    }
  }
}
Argument
Type
Required
Description

page

Int!

Yes

The page number to fetch.

perPage

Int

No

Number of results per page. Defaults to 10.

filter

OrderHistoryFilter

No

Optional filters to narrow results.

OrderHistoryFilter Fields

Field
Type
Description

orderId

String

Filter by a specific order ID

status

P2PPaymentStatus

Filter by payment status

dateFrom

ISO8601Date

Start of date range

dateTo

ISO8601Date

End of date range

paymentMethod

String

Filter by payment method

Returns a PaginatedP2PPayments object containing a data array of P2PPayment records and a pagination object.


Withdrawal Info

Argument
Type
Required
Description

symbol

String!

Yes

The asset symbol to fetch withdrawal info for (e.g. "USDC", "ETH").

Returns a WithdrawalInfo object — includes the asset symbol, name, icon, and supported networks.

Last updated