Model

If the REST call was successful, the response for all endpoints has the following form:

{
  "success": true,
  "data": any
}

The data type of the field data is dependent on the endpoint.

Account

{
  "id":"03a95e6d-fad6-48db-abe2-623e3faef31b",
  "workspace":"trever",
  "asset": Enum.AccountAsset,
  "type": Enum.AccountType,
  "foreign_id":null,
  "label":"Test Account",
  "customer_id":"1c5842c1-a9d9-41df-b45b-f58c3b3641b9",
  "venue_id":null,
  "system_created_at":1667916216019187272,
  "system_created_by":"dev@trever.io",
  "system_updated_at":1667916216019187272,
  "system_updated_by":"dev@trever.io",
  "version":"v0"
}

Attributes

  • id: ID of the returned account
  • workspace: Workspace of the returned account
  • asset: Asset of the returned account, e.g. EUR or BTC
  • foreign_id: Optional string describing an external Id
  • label: Optional label describing the returned account
  • customer_id: Optional customer ID of the returned account
  • venue_id: Optional venue ID of the returned account

Assets

{
  "asset": []model.ProtocolMetadata
}

Batch Withdrawal Request

{
  "service_id": "49dd5b29-5963-4e5c-b7c9-f9604857f2e0",
  "asset": "DASH",
  "quantity": "0.2",
  "source_wallet_id": "6c729fa5-e201-4577-b0d9-56828dded064",
  "fee": null,
  "fee_rate": null,
  "speed_level": "SLOW",
  "info": "28",
  "protocol": "DASH",
  "fiat": null,
  "stakes": [
    {
        "route_id": "c6623878-4a01-4e56-a27b-aeb8da293e77",
        "destination_address": "Xy1U6VjomQDYjM6DQf5RQx5kh6NePb4Jvc",
        "quantity": "0.1",
        "account_id": null,
        "info": "6ce5162d-1aed-4a87-a90c-74ad6abedfba",
        "config": "49dd5b29-5963-4e5c-b7c9-f9604857f2e0"
    },
    {
        "route_id": "dpdde1f0-f0bf-4e91-a27e-8745d0d7d577",
        "destination_address": "XuRe2TTiH2nH83mpyv4pGUhxJcXntyzuFW",
        "quantity": "0.1",
        "account_id": null,
        "info": "8f23d8ad-45a2-4553-99b1-12d82f461226",
        "config": "49dd5b29-5963-4e5c-b7c9-f9604857f2e0"
    }
  ]
} 

It is recommended that you do not build this model on your own to create the payload of the submit endpoint but only use valid answers from the prepare endpoint.

Booking

A Model for double-entry style booking.

This representation is returned by the following endpoints:

  • GET bookings/
  • GET bookings/:id
  • POST bookings/accounts/:id/set
{
  "id": uuid,
  "sequence_number": 16,
  "workspace": "trever",
  "label": "test booking",
  "system_created_at": 1667814137118077355,
  "system_created_by": "",
  "value_timestamp": 1667814137118077355,
  "booking_timestamp": 1667814137118077355,
  "type": Enum.BookingType,
  "quantity": "20500",
  "asset": "EUR",
  "execution": Model.BookingExecution,
  "entries": []Model.BookingEntry,
  "legs": []Model.BookingLeg,
  "booking_ref": uuid,
  "previous_booking_id": uuid,
  "next_booking_id": uuid
}

Attributes

  • id: Id of the returned booking
  • sequence_number: workspace unique sequence
  • workspace: workspace of the returned account
  • label: Optional label describing the returned account
  • type: Type of booking
  • quantity: Total quantity of DEBIT and CREDIT entries
  • asset: Asset of the returned account, e.g. EUR or BTC.
    • Optional: If the asset is not set, the value is set to DEPOT.
  • execution: Required if type is EXECUTION otherwise optional
  • entries: Array of booking entries according to double-entry booking method.
  • previous_booking_id: Used in booking rectification
  • next_booking_id: Used in booking rectification

Booking Entry

{
  "account_id":"03a95e6d-fad6-48db-abe2-623e3faef31c",
  "quanity":"20000",
  "asset":"EUR",
  "type":Enum.BookingEntryType
}

Attributes

  • account_id: ID of the account booked in this entry
  • quantity: Quantity of the booked asset
  • asset: Asset of the booking entry, e.g. EUR or BTC, …
  • type:
    • “CREDIT”: A “positive” balance of the asset with the above specified quantity
    • “DEBIT”: A “negative” balance of the asset with the above specified quantity

Booking Leg

{
  "account_label": "Integration Account",
  "account_id": "0927f56c-24c0-4637-84b7-adc6b1ce918c",
  "type": "DEBIT",
  "quantity": "1000"
}
  • account_label: Label of the underlying account.
  • account_id: Id of the underlying account.
  • type: Enum.BookingLegType. Defines the site of the account in this booking leg. Can be DEBIT or CREDIT.
  • quantity: Qantity in the asset of the booking.

Booking Execution

{
  "execution_id":"01bb1fb6-4093-11ed-9c26-3fdb8b9d854f",
  "customer_id":"778f4d6e-409f-11ed-afc4-f7d15a3054b5",
  "side":Enum.Side,
  "amount":"2.125",
  "base_asset":"BTC",
  "quote_asset":"EUR"
}

Attributes

  • execution:
    • execution_id: ID of the execution belonging to this booking
    • customer_id: Optional customer_id of the execution
    • side: Side of execution, either BUY or SELL
    • amount: Amount of base_asset
    • base_asset: Base asset of trading pair
    • quote_asset: Quote asset of trading pair

Booking Leg

{
  "account_label": "Integration Account",
  "account_id": "0927f56c-24c0-4637-84b7-adc6b1ce918c",
  "type": "DEBIT",
  "quantity": "1000"
}
  • account_label: Label of the underlying account.
  • account_id: Id of the underlying account.
  • type: Enum.BookingLegType. Defines the site of the account in this booking leg. Can be DEBIT or CREDIT.
  • quantity: Qantity in the asset of the booking.

Customer

{
  "id": "3cb8ca63-61e9-412f-b1ef-8709b41b2526",
  "workspace": "trever",
  "type": Enum.CustomerType,
  "foreign_id": "cn_app_cn_id_123",
  "label": "1234 - customer",
  "margin": Enum.MarginType,
  "first_name": "john",
  "last_name": "doe",
  "street": "Schubertstrasse",
  "house_number": "6a",
  "city": "Graz",
  "postal_code": "8010",
  "country": "Austria",
  "company_name": "ACME Inc.",
  "joint_name": "Mr. & Mrs. Smith",
  "notification_recipients": [],
  "account_ids": ["1e543aca-8955-40d0-b8a5-040568663d23"],
  "investment_entity_ids": [],
  "ignore_balance_check": false,
  "ignore_margin": true,
  "booking_schema": "ADVANCED",
  "system_created_at": 1706269397145820200,
  "system_created_by": "dev@trever.io",
  "system_updated_at": 1706269397217358800,
  "system_updated_by": "dev@trever.io"
}

Attributes

  • company_name: Company name of the customer
  • first_name: First name of the customer
  • foreign_id: ID string in the foreign system
  • investment_entity_ids: ID string of the investment entity
  • joint_name: Joint name of the customer
  • label: Display label in the Trever front-end
  • last_name: Last name of the customer
  • street: customer address street,
  • house_number: customer address house number,
  • city: customer address city,
  • postal_code: customer address postal code,
  • country: customer address austria,
  • margin: Markup category of a customer Enum.MarginType
  • notification_recipients: email address used for event notifications
  • type: Customer type. Enum.CustomerType
  • booking_schema: defines which booking schema is used for a customer. Enum.BookingSchema
  • ignore_balance_check: Determines whether or not the balance check should be suspended for this customer.
  • ignore_margin: Determines whether no margin should be charged for this customer

Customer Execution Result

{
  "customer_id": uuid,
  "rectified": Model.RectificationStatus,
  "amount": "1",
  "price": "0.533915",
  "volume": "0.54",
  "amount_net": "1",
  "price_net": "0.54",
  "volume_net": "0.54",
  "price_with_margin_and_risk": "0.5427",
  "volume_with_margin_and_risk": "0.5427"
}

Deposit

{
  "id": "c6947ce3-ed00-49fe-ae52-b0a19ffb9804",
  "foreign_id": "FTcp5dH-W5hai5igV4cQeWxoGH9bTw",
  "to_service_id": "181c9bf0-8781-4c09-9f21-1ffd8cabfd2e",
  "state": Enum.DepositState,
  "created_at": 1706544163000000000,
  "end_at": null,
  "asset": "XLM",
  "fee": "0",
  "fee_asset": null,
  "protocol": "Stellar XLM",
  "quantity": "53.98",
  "quantity_net": "53",
  "reference": null,
  "destination_address": "GCPZQLTKWOV3DO7JI2ABCT4NSQFUCZNVF7HM3TJ4JZJPYIZX24OOTP5W",
  "source_address": null,
  "assignment_data": null,
  "system_created_at": 1706544574812666965,
  "system_created_by": null,
  "system_updated_at": null,
  "system_updated_by": null,
  "assignment_state": "ASSIGNED",
  "booking_ids": null
}

Attributes

  • foreign_id: ID string that is used the to identify the deposit in the foreign system
  • state: State of the transcation
  • asset: The asset that is transfered
  • fee: Fee for the deposit
  • fee_asset: The “currency” the fee was charged in
  • protocol: The used transaction protocol
  • quantity: The quantity of the transferred asset
  • quantity_net: The quantity of the transferred asset, not including the fee

Deposit Assignment

{
  "id": "6e9aa4c4-b405-4f97-b198-f8b3e6a19d49",
  "quantity": "0.0025334",
  "deposit_id": "3301edea-3e42-444f-a2e0-4369a2969dbe",
  "customer_account_id": "59012e87-f445-4149-8388-fdac7fa3d933",
  "state": Enum.DepositAssignmentState,
  "system_created_at": 1721831357052397886,
  "system_created_by": "dev@trever.io",
  "system_updated_at": 1721831357052397886,
  "system_updated_by": "dev@trever.io",
  "booking_ids": [
      "c6cb7785-ba65-4075-8726-bbe0efb1a71e"
  ],
  "asset": "ETH"
}

Attributes

  • quantity: The quantity of the transferred asset.
  • deposit_id: ID of the underlying deposit.
  • customer_account_id: The account to which the assignment was assigned.
  • state: State of the Assignment. Can be set manually by using the PATCH endpoint for deposit/:deposit_id/assignments.
  • booking_ids: List of the corresponding bookings.
  • asset: The asset that is transferred.

Deposit Assignment Rectifications

{
  "id": "193b1b1f-2876-4748-924a-7f2576413a16",
  "note": "Compliance has not been successful!",
  "reason": "COMPLIANCE",
  "deposit_id": "3301edea-3e42-444f-a2e0-4369a2969dbe",
  "system_created_at": 1721984994070836854,
  "system_created_by": "dev@trever.io",
  "origin_assignment_ids": [
    "3539de6c-7f55-4193-86e7-3f715992254f",
    "6e9aa4c4-b405-4f97-b198-f8b3e6a19d49"
  ],
  "target_assignment_ids": [
    "4e400aa0-3321-48c2-aea7-e5447aedb8e2",
    "c6cb7785-ba65-4075-8726-bbe0efb1a71e"
  ]
}

Attributes

  • note: An optional note.
  • reason The reason for the rectification.
  • deposit_id: ID of the underlying deposit.
  • origin_assignment_ids: The original assignments that have been rectified.
  • target_assignment_ids: The IDs of the assignments that were created due to this rectification.

Execution

Attributes

{
  "id": "3f496351-4de6-483a-847b-e8e39dc6fe0f",
  "workspace": "trever",
  "system_created_at": 1660051174190463403,
  "system_created_by": "t.test@example.io",
  "system_updated_at": 1660051174190463403,
  "system_updated_by": "t.test@example.io",
  "amount": "100",
  "mode": Enum.ExecutionRequestMode,
  "price": "0.00102681772",
  "route": Model.PriceStreamRoute,
  "execution_type": Enum.ExecutionType,
  "tif_mode": Enum.ExecutionTifMode,
  "stop_order_condition": Enum.StopOrderCondition,
  "good_till_date": 1660051174190463403,
  "fee_aware": false,
  "is_best": true,
  "slippage": "0",
  "side": Enum.Side,
  "client_ref": "479d114a-55a9-4fe4-add7-208b9e608112",
  "customers": []Model.ExecutionCustomer,
  "state": Enum.ExecutionState,
  "reason": "",
  "execution_result": {
    "amount": "1",
    "price": "0.533915",
    "volume": "0.54",
    "amount_net": "1",
    "price_net": "0.54",
    "volume_net": "0.54",
    "price_with_margin_and_risk": "0.5427",
    "volume_with_margin_and_risk": "0.5427",
    "price_based_on_config": "0.5427",
    "volume_based_on_config": "0.5427"
  },
  "booking_ids": [
    "99a98c04-9d55-4e56-90ea-bd0057a22cf7",
    "43cded00-8208-4b1f-bcb1-d8c7118a64b7"
  ],
  "customer_execution_results": []Model.CustomerExecutionResult,
  "hop_infos": []Model.HopInfo,
  "retry_count": 0,
  "risk": "0.01",
  "margin": "0.01"
}
  • amount: Resulting gross amount of the execution
  • price: Limit or Stop price of the execution
  • quote: Referenced quote for the execution
  • execution_type: Enum.ExecutionType
  • mode: Enum.ExecutionRequestMode. Distinguishes between volume orders and amount orders.
  • tif_mode: Enum.ExecutionTifMode, used for LIMIT and STOP orders
  • good_till_date: Timestamp where the execution gets canceled, only used for limit orders
  • stop_order_condition: Enum.StopOrderCondition, stop order parameter. Defines the type of the STOP order
  • fee_aware: Indicates whether the execution is fee aware or not
  • side: Enum.Side
  • is_best: Boolean if true the execution was handled as ‘Best Execution’.
  • route: Model.PriceStreamRoute
  • client_ref: Reference value passed by the client
  • customer_id: Referenced customer for bookkeeping
  • state: Enum.ExecutionState
  • reason: Error reason
  • execution_result: Result for the execution. amount, price and volume in gross and net

Execution Customer

{
  "customer_id": uuid,
  "quantity_absolute": "0.1"
}

Execution Order

{
  "id": "265ca45d-c319-413d-9fa9-e4c1217d2e5a",
  "base_asset": "BTC",
  "quote_asset": "EUR",
  "price": "0",
  "amount": "0.01695753",
  "side": "buy",
  "type": "market",
  "state": "closed",
  "system_created_at": 1715010169349528246,
  "account_ref": 0,
  "foreign_order_id": "1a3036ab-3320-459d-ac92-18a21f603d10",
  "service_id": "8949b07d-696f-4832-871c-d16a069617d9",
  "reference_id": "39af9e52-d2d2-4bd3-a25c-a2f5d9e2fb4a",
  "app_reference": "",
  "closed_at": 1715010169458339152,
  "opened_at": 0,
  "canceled_at": 0,
  "exchange_name": "HYP_SB",
  "tif_mode": null,
  "good_till_date": null
}

Execution Fill

{
  "order_id": "265ca45d-c319-413d-9fa9-e4c1217d2e5a",
  "fills": [
    {
      "id": "f43a16ac-d7a2-40c4-8397-210efccf0d6f",
      "trade_id": "b303389e-5948-4f35-979a-b4c354ae5ba9",
      "order_id": "265ca45d-c319-413d-9fa9-e4c1217d2e5a",
      "fee": "0",
      "fee_asset": "",
      "liquidity": "taker",
      "system_created_at": 1715010169477814467,
      "price": "58942.23",
      "amount": "0.01695753",
      "volume": "999.51",
      "foreign_trade_id": "1a3036ab-3320-459d-ac92-18a21f603d10",
      "traded_at": 1715010169458339243,
      "side": "buy",
      "amount_net": "0.01695753",
      "price_net": "58941.956759032712900994425485315373",
      "volume_net": "999.51"
    }
  ],
  "exchange_name": "HYP_SB",
  "base_asset": "BTC",
  "quote_asset": "EUR"
}

Matching

    {
      "id": "1bee8132-75ee-4d45-9fe1-1dc0c45324b7",
      "resource_id": "0306ce84-def9-4400-a977-be1a150e6728",
      "type": "DESTINATION_WITH_REFERENCE",
      "workspace": "trever",
      "details": {
        "asset": "XLM",
        "is_withdrawal_matching": true,
        "destination_address": "GA5XIGA5C7QTPTWXQHY6MCJRMTRZDOSHR6EFIBNDQTCQHG262N4GGKTM",
        "reference": "A Reference Text"
      },
      "system_created_by": "dev@trever.io",
      "system_created_at": 1729070963790335500,
      "system_updated_by": "dev@trever.io",
      "system_updated_at": 1729071121630700500
    }

Attributes

  • id: The ID of the matching.
  • resource_id: The account that is matched.
  • type: Enum.MatchingType
  • details
    • asset: The asset to be matched for.
    • is_withdrawal_matching: If True then the matching for withdrawals is valid. If False then it applies to deposits.
    • destination_address: If the address specified here is the destination of a transaction, the transaction is assigned to the account in resource_id. Only used for type DESTINATION_WITH_REFERENCE and DESTINATION_WITHOUT_REFERENCE.
    • source_address: If the address specified here is the source of a transaction, the transaction is assigned to the account in resource_id. Only used for type SOURCE_WITH_REFERENCE and SOURCE_WITHOUT_REFERENCE.
    • reference: If several accounts are matched to the same address, an additional reference can be used. Only used for type DESTINATION_WITH_REFERENCE and SOURCE_WITH_REFERENCE.

Settlement Fill

{
  "id": "b18a2618-f1c5-4f4e-bd61-f37f3f69dac0",
  "trade_id": "b5bd7e95-6350-4825-ad3d-67f6d6ce54f1",
  "order_id": "2465e534-bdc9-4a41-97e6-0e27a43bca31",
  "amount": "2",
  "price": "0.425957",
  "volume": "0.86",
  "base_asset": "ADA",
  "quote_asset": "EUR",
  "side": Enum.Side,
  "fee": "0",
  "fee_asset": "",
  "traded_at": 1713439636281402267,
  "order_created_at": 1713439636201500583,
  "foreign_order_id": "a622197c-c67c-4533-9f95-973ff5100690",
  "settlement_id": null,
  "fill_state": Enum.FillState
}

Attributes

  • id: Fill ID
  • trade_id: ID of the underlying trade
  • order_id: ID of the underlying order
  • amount: Resulting gross amount of the fill
  • price: Resulting gross price of the fill
  • volume: The volume is the product of quantity and price
  • base_asset: Base asset of the executed route
  • quote_asset: Quote asset of the executed route
  • side: Enum.Side
  • fee: Fee from the trading venue
  • fee_asset: The currency/asset in which the fee must be paid
  • traded_at: Timestamp of the trade on the trading venue
  • order_created_at: Timestamp of the order creation in Trever
  • settlement_id: ID of the settlement, if part of a settlement
  • fill_state: Status of a fill in relation to a settlement. Default status is NOT_ASSIGNED. If it has already been assigned to a settlement, the status is PENDING. If this settlement has already been completed, the status is SETTLED

TomsFill

Attributes

{
  "id": "10bf53b6-ba82-40ea-9b0c-4c2814cb849b",
  "order_id": "2465e534-bdc9-4a41-97e6-0e27a43bca31",
  "price": "0.5603964",
  "amount": "100",
  "volume": "56.04",
  "fee": "0",
  "fee_asset": "",
  "base_asset": "LUNA",
  "quote_asset": "EUR",
  "side": Enum.Side,
  "traded_at": 1713273758613197378,
  "order_created_at": 1713273758508187323
}
  • id: Fill ID
  • order_id: ID of the underlying order
  • price: Resulting gross price of the fill
  • amount: Resulting gross amount of the fill
  • volume: The volume is the product of quantity and price
  • fee: Fee from the trading venue
  • fee_asset: The currency/asset in which the fee must be paid
  • base_asset: Base asset of the executed route
  • quote_asset: Quote asset of the executed route
  • side: Enum.Side
  • traded_at: Timestamp of the trade on the trading venue
  • order_created_at: Timestamp of the order creation in Trever

Hop Info

{
  "execution_id": uuid,
  "hop_no": 0,
  "retry_count": 0,
  "id": uuid,
  "state": Enum.HopInfoState,
  "reason": null,
  "order_id": uuid,
  "fills": []Model.Fill,
  "system_created_at": 0,
  "system_created_by": "",
  "system_updated_at": 1,
  "system_updated_by": "execution-engine@trever.io"
}

PriceStreamRoute

{
  "id": "e09a3da4-f1ca-422b-b7d1-cc1aab46cbc8",
  "name": "test route",
  "workspace": "trever",
  "base_asset": "AVAX",
  "quote_asset": "BTC",
  "hops": [
    {
      "venue_id": "02c66494-b30c-4338-8324-51bc68ab5438",
      "base_asset": "AVAX",
      "quote_asset": "BTC"
    }
  ],
  "default_margin": true,
  "default_risk_quantile": true,
  "margin": "0",
  "risk_quantile": "0",
  "type": Enum.PriceStreamRouteType,
  "version": "v3"
}

Attributes

  • base_asset: The asset that should be bought
  • quote_asset: The asset that should be used for payment
  • hops: If a venue does not support the route from the chosen base asset to the chosen quote asset multiple hops can be used. E.g. AVAX to EUR and EUR to BTC
  • default_margin: Defines if the default margin should be used (default margin is a workspace setting that can be set globally)
  • margin: If default margin is false, sets margin for this route
  • defautl_risk_quantile: Defines if the default risk quantile should be used (default risk quantile is a workspace setting that can be set globally)
  • risk_quantile: If default risk quantile is false, set risk quantile for this route here

Protocol Metada

{
  "service": "DEFAULT",
  "asset": "BTC",
  "protocol": "BTC",
  "minimum_withdrawal": "0",
  "withdraw_fee": "0",
  "withdraw_fee_asset": "BTC",
  "deposit_fee": "0",
  "setup_fee": "0",
  "system_created_at": 1715904133928991200,
  "system_created_by": "metadatasync@trever.io",
  "system_updated_at": 1722384142373780500,
  "system_updated_by": "metadatasync@trever.io"
}

Quote


{
  "id": "4307f42b-e040-4901-9f8a-20d4212140fc",
  "route_id": "3c8f537c-d7e0-4ccc-95a9-4bf49da23aac",
  "customer_id": "7d28188c-f897-4e73-bba3-3136809dae46",
  "request_side": Enum.Side,
  "execution_type": Enum.ExecutionType,
  "risk_quantile": "0.95",
  "risk_duration_ms": 0,
  "margin": "0.01",
  "expire_at": 1712573515313809139,
  "amount_asset": "ADA",
  "price_asset": "EUR",
  "volume_asset": "EUR",
  "client_ref": null,
  "is_batch": false,
  "customers": [
    {
      "customer_id": "7d28188c-f897-4e73-bba3-3136809dae46",
      "quantity_absolute": "50"
    }
  ],
  "request_asset": "ADA",
  "request_quantity": "50",
  "risk_fac_ask": "0",
  "risk_fac_bid": "0",
  "amount_ask": "50",
  "amount_bid": "50",
  "price_ask": "0.56819671",
  "price_bid": "0.55622655",
  "volume_ask": "28.4098355",
  "volume_bid": "27.8113275",
  "price_ask_without_margin_and_risk": "0.562571",
  "price_bid_without_margin_and_risk": "0.561845",
  "volume_ask_without_margin_and_risk": "28.12855",
  "volume_bid_without_margin_and_risk": "28.09225"
}

Attributes

  • id: ID of the returned quote
  • route_id: Price Stream Route ID
  • customer_id: Customer ID
    • Optional: only set if provided in the request
  • request_asset: Requested asset
  • request_quantity: Requested quantity
  • request_side: Requested side
  • execution_type: Execution type of the quote
    • Optional: only set if provided in the request
  • risk_duration_ms: Requested risk duration in milliseconds
  • expire_at: Unix epoch timestamp in nanoseconds indicates how long the returned quote is valid
  • amount_asset: Asset of the quote amount. This is always the base asset of the route
  • amount_ask: Amount in base asset for the buy side of the quote
  • amount_bid: Amount in base asset for the sell side of the quote
  • price_asset: Asset of the quote price. This is always the quote asset of the route
  • price_ask: Price in quote asset per 1 unit of base asset for buying
  • price_bid: Price in quote asset per 1 unit of base asset for selling
  • volume_asset: Asset of the quote volume. This is always the quote asset of the route.
  • volume_ask: Volume in quote asset for the buy side of the quote. This is always amount_ask * price_ask
  • volume_bid: Volume in quote asset for the sell side of the quote. This is always amount_bid * price_bid

Rectification Status

{
  "reason": Enum.RectificationReason,
  "note": "a user specified note"
}

Service

{
  "id": "49dd5b29-5963-4e5c-b7c9-f9604857f2e0",
  "label": "Pricestream Sandbox",
  "type": "PRICE_STREAM",
  "customer_id": null,
  "system_created_at": 1721229912019683000,
  "system_updated_at": 1721229912019683000,
  "system_created_by": "dev@trever.io",
  "system_updated_by": "dev@trever.io",
  "secret_name": "trever/VEN/DEFAULT/0",
  "secret_name_ws": null
}

Settlement

{
  "id": "7dc226eb-3d3b-4997-9c9a-2e170697cd03",
  "workspace": "trever",
  "state": Enum.SettlementState,
  "fill_count": 2,
  "venue_info": []Model.VenueInfo,
  "timerange_from": 1710806400000000000,
  "timerange_to": 1711497600000000000,
  "system_created_at": 1711461849256351282,
  "system_created_by": "dev@trever.io",
  "system_updated_at": 1711462168014474555,
  "system_updated_by": "dev@trever.io"
}

Treasury Job

{
  "id":"10cbe680-529f-4cac-88aa-2fcfa538e310",
  "workspace":"trever",
  "route":"7550b736-daa4-4ed8-acef-d47e6694e23f",
  "quantity":"100",
  "min_quantity": "10",
  "speed_level": Enum.SpeedLevel,
  "fee": "0.0002",
  "active":false,
  "last_run":1707904801960553700,
  "interval":720, # 12 hours
  "condition_type":Enum.ConditionType,
  "conditions":[]Model.TreasuryJobCondition,
  "system_created_at":1702391922061574613,
  "system_created_by":"dev@trever.io",
  "system_updated_at":1707906997564325259,
  "system_updated_by":"dev@trever.io"
}

Attributes

  • id: The id of the job that should be edited.
  • route: The Treasury route to use for the transaction.
  • quantity: The amount to be transferred. Only relevant for condition_type CONDITIONAL.
  • active: Boolean to specify whether or not the job should be active after creation.
  • last_run: Unix timestamp of the last run. Run in this case means check conditions and run the job if they are met.
  • interval: The interval between job executions in minutes. Choose between 15, 30, 60, or 240 (4h), 720 (12h) or 1440 (24h).
  • speed_level: Supported speed levels from the underlying venue. Slow = low fee, Fast = High fee.
  • fee: If speed_level is CUSTOM a fee can be set. Note: Not all venues support custom fee.
  • min_quantity: Set a minimum quantity for a transaction to avoid too many small transactions.
  • condition_type: Enum.ConditionType
  • conditions: The set of conditions that have to be met.

Treasury Job Condition

Condition Type CONDITIONAL

{
  "balance_side": "from",
  "predicate": "GTE",
  "quantity": "100"
}

Condition Type SWEEPING or PROVISION

{
  "target": "50"
}

Attributes

  • balance_side: Specifies whether to check the wallet balance of the source or destination. Can be from or to.
  • predicate: The mathematical operator with which the wallet balance and quantity are to be compared. Enum.Predicate
  • quantity: The amount to be transferred. Only relevant for condition_type CONDITIONAL.
  • target: Specifies the threshold for the types SWEEPING and PROVISION.

Treasury Route

{
  "id": "1a2d3a6a-9fe4-4f26-8fe3-2d25e9280877",
  "workspace": "trever",
  "label": "Binance -> Kraken - XLM",
  "from_wallet_id": "e88b5168-c70b-482d-9d31-da1a339cf2b0",
  "to_wallet_id": "181c9bf0-8781-4c09-9f21-1ffd8cabfd2e",
  "protocol": "XLM",
  "transfer": {},
  "settlement": {},
  "from_wallet": Model.Wallet,
  "to_wallet": Model.Wallet,
  "system_created_at": 1692612084951242000,
  "system_created_by": "dev@trever.io",
  "system_updated_at": 1700562777764892700,
  "system_updated_by": "dev@trever.io"
}

Transfer Object for Fireblocks

"transfer": {
  "from": {
    "destination_external_account_id": "f97c649d-cad0-4e84-8556-37b5f98627b7",
    "source_vault_account_id": "0"
  },
  "to": {
    "on_allowlist":true
  }
}

Transfer Object for Tangany

"transfer": {
  "from": {
    "destination_external_account_id": "f97c649d-cad0-4e84-8556-37b5f98627b7",
    "source_vault_account_id": "0"
  }
}

Attributes

  • label: A legible display name.
  • from_wallet_id: Wallet ID of the source wallet.
  • to_wallet_id: Wallet ID of the destination wallet.
  • protocol: The protocol to be used to transfer the asset.
  • transfer: Venue-specific information. Please note the examples for the individual venues.
  • settlement: Settlement Information.
  • from_wallet: The object of the source wallet.
  • to_wallet: The object of the destination wallet.

Venue

  "id": "3517699f-b753-411a-80a7-a4da56f24475",
  "workspace": "trever",
  "venue_code": "VEN",
  "label": "Custody Venue - Institutional",
  "system_created_at": 1721229912019683000,
  "system_updated_at": 1721229912019683000,
  "system_created_by": "dev@trever.io",
  "system_updated_by": "dev@trever.io",
  "secret_name": "trever/VEN/DEFAULT/0",
  "services": []model.Service,
  "balance_limits": model.VenueBalanceLimits,
  "balance_limits_configs_id": "627bc5c5-0e59-47e2-b4de-71b21ebb0bab",
  "account_id": "20d4d3bd-c1a0-4816-a882-e7db73a21ff9"

Venue Balance Limits

{
  "id": "627bc5c5-0e59-47e2-b4de-71b21ebb0bab",
  "enabled": true,
  "fiat": {
    "id": "95293c53-2933-467a-bac1-e589a43313a7",
    "critical_less_than": "100",
    "warning_less_than": "200",
    "warning_greater_than": "50000",
    "critical_greater_than": "10000"
  },
  "total": {
    "id": "2a92b2af-e924-4607-bd37-39457b3aec66",
    "critical_less_than": "100",
    "warning_less_than": "500",
    "warning_greater_than": "1000",
    "critical_greater_than": "1500"
  },
  "digital_assets": {
    "id": "2d3ccdc0-56f4-40a7-b49d-c862f071d940",
    "critical_less_than": "0",
    "warning_less_than": "50",
    "warning_greater_than": "10000",
    "critical_greater_than": "500000"
  },
  "fiat_limits_id": "95293c53-2933-467a-bac1-e589a43313a7",
  "total_limits_id": "2a92b2af-e924-4607-bd37-39457b3aec66",
  "digital_assets_limits_iod": "2d3ccdc0-56f4-40a7-b49d-c862f071d940"
}

Venue Info

{
  "venue_id": "8ca97202-910a-46dc-8976-ee217f1d1bb6",
  "venue_code": "KRA",
  "label": "Institutional"
}

Venue Balances

{
  "spot": {
    "EUR": {
      "free": "50",
      "used": "0",
      "total": "50"
    },
    "BTC": {
      "free": "2.5",
      "used": "0",
      "total": "2.5"
    },
    "ETH": {
      "free": "0.011703409360252406",
      "used": "0",
      "total": "0.011703409360252406"
    }
  },
  "main": null,
  "margin": null
}

Wallet

{
  "id": "12a8b943-0e98-4bdd-b2b5-70db9d8d0b23",
  "workspace": "trever",
  "asset": "XLM",
  "address": "0x78768e7r8w7e68r76we8r8wer88",
  "service_id": "181c9bf0-8781-4c09-9f21-1ffd8cabfd2e",
  "account_id": "842c84c4-c013-4abc-bd39-40103d453b9b",
  "customer_id":"bf95ec68-fb51-4a17-b70c-c8dd0a4d2455",
  "reference_text": "Account Nr.1234",
  "label": "API Test Wallet",
  "foreign_id": "external id",
  "access_type": Enum.WalletAccessType,
  "configuration": Model.WalletConfiguration,
  "type": Enum.WalletType,
  "venue_id": "8ca97202-910a-46dc-8976-ee217f1d1bb6",
  "venue_code": "KRA",
  "venue_label": "Institutional",
  "service_venue_id": "8ca97202-910a-46dc-8976-ee217f1d1bb6",
  "service_venue_code": "KRA",
  "service_venue_label": "Institutional",
  "account_label": "Kraken - Institutional - Account",
  "system_created_at": 1714118473507104985,
  "system_created_by": "dev@trever.io",
  "system_updated_at": 1714118473507104985,
  "system_updated_by": "dev@trever.io"
}

Attributes

  • asset: The asset that is stored in this wallet.
  • address: The deposit address of the wallet.
  • service_id: Service ID of the assigned Treasury Integration (former Woms) service.
  • account_id: Service ID of the assigned account in Trever.
  • customer_id: Mandatory if type is CUSTOMER. The id of the customer to whom the wallet is to be assigned.
  • reference_text: Can be used for Fiat Wallets.
  • label: Display name in the Trever front-end.
  • foreign_id: Identifier for external systems.
  • access_type: Can be internal for managed wallets or external for unmanaged wallets.
  • configuration: Venue-specific information. Please note the configurations for the individual venues in the Wallet Configuration Section.
  • type: Model.WalletType. Can be a CUSTOMER, VENUE, or OTHER.
  • venue_id: The ID of the venue, if a venue is used (access_type = internal).
  • venue_code: The TREVER-internal code for a venue, if a Venue is used (access_type = internal). To see all venue codes check Supported Venues
  • venue_label: The label of the service, if a venue is used (access_type = internal).
  • service_venue_id: The ID of the venue, if a service is used (access_type = internal).
  • service_venue_code: The TREVER-internal code for a venue, if a service is used (access_type = internal). To see all venue codes check Supported Venues
  • service_venue_label: The label of the venue, if a service is used (access_type = internal).
  • account_label: The label of the underlying account.

Wallet Configuration

{
  "create_external_wallet": true,
  "protocol": "LTC",
  "vault_id": "16"
}

Attributes

Optional Configurations for Venues

Fireblocks
  • create_external_wallet: if true the wallet will be created on the venue. A new address is generated on the venue and stored in the wallet on Trever.
  • protocol: In Fireblocks the wallet needs an asset and a protocol on creation. To see all supported assets and their protocols go to the venue screen in Trever.
  • vault_id: the id of the vault (collection of wallets, one wallet per asset in one vault) the wallet should be stored in. If left empty, a new vault is created and stored in the wallet in Trever.
  • vault_name: OPTIONAL. If a create_external_wallet is set to true and no vault_id is passed, a new vault account on fireblocks is created. In this case the user has the option to name the new vault. If this no vault_name is passed, the name will be ’trever - [uuid]'
Tangany
  • create_external_wallet: if true the wallet will be created on the venue. A new address is generated on the venue and stored in the wallet on Trever.
  • customer_id: The account id that should be used to create the wallet.
  • wallet_id: If an existing wallet should be used.
Banck Frick
  • customer_number: The customer number of the connected venue.
  • customer_account_number: The account number for this sub account at Bank Frick.

Withdrawal

{
  "id": "46671b58-801b-4f26-a016-b1b6f2e538c7",
  "workspace": "trever",
  "foreign_id": "7e8a8028c1844c4684a95ce2bc515857",
  "from_info": "",
  "from_service_id": "e88b5168-c70b-482d-9d31-da1a339cf2b0",
  "to_info": "",
  "deposit_address": "GA5XIGA5C7QTPTWXQHY6MCJRMTRZDOSHR6G262N4GGKTM",
  "withdrawal_address": "",
  "state": "SUCCESS",
  "created_at": 1706540408000000000,
  "end_at": null,
  "asset": "XLM",
  "fee": "0.02",
  "fee_asset": null,
  "fee_rate": null,
  "speed_level": null,
  "protocol": "XLM",
  "quantity": "53.98",
  "quantity_net": "5.00139495917183",
  "reference": null,
  "route_id": null,
  "assignment_data": null,
  "system_created_at": 1706540408598959597,
  "system_created_by": null,
  "system_updated_at": null,
  "system_updated_by": null,
  "note": null,
  "to_service_id": null,
  "label": null,
  "assignment_state": "NOT_ASSIGNED",
  "fiat_name": null,
  "fiat_bic": null,
  "fiat_address": null,
  "fiat_postal_code": null,
  "fiat_city": null,
  "fiat_country": null,
  "booking_ids": null
}

Attributes

  • asset: The asset that should be transferred
  • from_id: Service ID of the source Treasury Integration (former Woms) service
  • to_id: Service ID of the destination Treasury Integration (former Woms) service
  • label: Display name in the Trever front-end
  • deposit_address: Wallet address of the destination
  • asset: The asset that is transferred
  • fee: Required transaction fee for the transaction
  • fee_asset: The “currency” the fee was charged in
  • protocol: The used transaction protocol

Withdrawal Assignment

{
  "id": "6e9aa4c4-b405-4f97-b198-f8b3e6a19d49",
  "quantity": "0.0025334",
  "withdrawal_id": "3301edea-3e42-444f-a2e0-4369a2969dbe",
  "customer_account_id": "59012e87-f445-4149-8388-fdac7fa3d933",
  "state": Enum.WithdrawalAssignmentState,
  "system_created_at": 1721831357052397886,
  "system_created_by": "dev@trever.io",
  "system_updated_at": 1721831357052397886,
  "system_updated_by": "dev@trever.io",
  "booking_ids": [
      "c6cb7785-ba65-4075-8726-bbe0efb1a71e"
  ],
  "asset": "ETH"
}

Attributes

  • quantity: The quantity of the transferred asset.
  • withdrawal_id : ID of the underlying withdrawal.
  • customer_account_id: The account to which the assignment was assigned.
  • state: State of the Assignment. Can be set manually by using the PATCH endpoint for withdrawal/:withdrawal_id/assignments.
  • booking_ids: List of the corresponding bookings.
  • asset: The asset that is transferred.

Withdrawal Assignment Rectifications

{
  "id": "193b1b1f-2876-4748-924a-7f2576413a16",
  "note": "Compliance has not been successful!",
  "reason": "COMPLIANCE",
  "withdrawal_id": "3301edea-3e42-444f-a2e0-4369a2969dbe",
  "system_created_at": 1721984994070836854,
  "system_created_by": "dev@trever.io",
  "origin_assignment_ids": [
    "3539de6c-7f55-4193-86e7-3f715992254f",
    "6e9aa4c4-b405-4f97-b198-f8b3e6a19d49"
  ],
  "target_assignment_ids": [
    "4e400aa0-3321-48c2-aea7-e5447aedb8e2",
    "c6cb7785-ba65-4075-8726-bbe0efb1a71e"
  ]
}

Attributes

  • note: An optional note.
  • reason The reason for the rectification.
  • withdrawal_id : Id of the underlying withdrawal.
  • origin_assignment_ids: The original assignments that have been rectified.
  • target_assignment_ids: The ids of the assignments that were created due to this rectification.