Changelog
Introduction

Sections

Theme switcher

gRPC

This gRPC model defines several services within a package designed for the Broker API, focusing on crm events, such as timeline and payment events. Below is the complete documentation for all services and their methods.

The address to connect to the gRPC stream is: grpc-broker-api-demo.match-trader.com.

A separate gRPC ping stream sends pings every 50 seconds (configurable) to maintain an active connection.

Below is the corresponding Protobuf definition used for the gRPC service.

Protocol Buffers
syntax = 'proto3'; option java_multiple_files = true; option java_package = 'com.matchtrade.broker_api.grpc'; package com.matchtrade.broker_api.grpc; service CrmAccountInfoServiceExternal { rpc getAccountEventStream (PBAccountEventRequestExternal) returns (stream PBAccountEventStreamResponseExternal) {} } service PaymentService { rpc StreamWithdrawals (WithdrawalRequestExternal) returns (stream WithdrawalStreamResponseExternal); rpc StreamDeposits (DepositRequestExternal) returns (stream DepositStreamResponseExternal); } service PBTimelineServiceExternal { rpc GetDepositEventsStream(PBTimelineRequestExternal) returns (stream PBTimelineEventResponseExternal); rpc GetWithdrawalEventsStream(PBTimelineRequestExternal) returns (stream PBTimelineEventResponseExternal); rpc GetLoginEventsStream(PBTimelineRequestExternal) returns (stream PBTimelineEventResponseExternal); rpc GetManagerAssignmentEventsStream(PBTimelineRequestExternal) returns (stream PBTimelineEventResponseExternal); rpc GetTaskEventsStream(PBTimelineRequestExternal) returns (stream PBTimelineEventResponseExternal); rpc GetNoteEventsStream(PBTimelineRequestExternal) returns (stream PBTimelineEventResponseExternal); } message PBAccountEventRequestExternal { repeated string accountEmails = 1; repeated string accountUuids = 2; repeated string branchUuids = 3; } message PBAccountEventStreamResponseExternal { oneof msg { PBAccountEvent accountEvent = 1; bool heartbeat = 2; } } message PBAccountEvent { PBAccount account = 1; PBEventType eventType = 2; } enum PBEventType { CREATED = 0; UPDATED = 1; DELETED = 2; } message PBAccount { string uuid = 1; int64 created = 2; int64 updated = 3; string email = 4; string verificationStatus = 5; string type = 6; PBPersonalDetails personalDetails = 7; PBContactDetails contactDetails = 8; PBAccountConfiguration accountConfiguration = 9; PBAddressDetails addressDetails = 10; PBBankingDetails bankingDetails = 11; PBLeadDetails leadDetails = 12; } message PBPersonalDetails { string firstname = 1; string lastname = 2; string dateOfBirth = 3; string citizenship = 4; string language = 5; string maritalStatus = 6; PBPassportDetails passport = 7; string taxIdentificationNumber = 8; } message PBPassportDetails { string number = 1; string country = 2; } message PBContactDetails { string phoneNumber = 1; string faxNumber = 2; PBToContact toContact = 3; string alternativePhoneNumber = 4; } message PBToContact { int64 toContactDate = 1; bool alreadyContacted = 2; } message PBAccountConfiguration { int64 partnerId = 1; string branchUuid = 2; string roleUuid = 3; PBAccountManager accountManager = 4; string ibParentTradingAccountUuid = 5; PBCrmUserScope crmUserScope = 6; bool accountTypeContact = 7; } message PBAccountManager { string uuid = 1; string email = 2; string name = 3; } message PBCrmUserScope { repeated string branchScope = 1; repeated string managerPools = 2; } message PBAddressDetails { string country = 1; string state = 2; string city = 3; string postCode = 4; string address = 5; } message PBBankingDetails { string bankAddress = 1; string bankSwiftCode = 2; string bankAccount = 3; string bankName = 4; string accountName = 5; } message PBLeadDetails { string statusUuid = 1; string source = 2; string providerUuid = 3; int64 becomeActiveClientTime = 4; string status = 5; } message WithdrawalRequestExternal { repeated string accountEmails = 1; repeated string accountUuids = 2; repeated string branchUuids = 3; } message DepositRequestExternal { repeated string accountEmails = 1; repeated string accountUuids = 2; repeated string branchUuids = 3; } message DepositStreamResponseExternal { oneof msg { DepositEvent depositEvent = 1; bool heartbeat = 2; } } message WithdrawalStreamResponseExternal { oneof msg { WithdrawalEvent withdrawalEvent = 1; bool heartbeat = 2; } } message DepositEvent { DepositViewModelExternalResponseDto depositDetails = 1; PBEventType depositEventType = 2; } message WithdrawalEvent { WithdrawViewModelExternalResponseDto withdrawalDetails = 1; PBEventType withdrawalEventType = 2; } message DepositViewModelExternalResponseDto { string uuid = 1; int64 partnerId = 2; string created = 3; string updated = 4; string createdBy = 5; string updatedBy = 6; optional string remark = 7; optional string errors = 8; AccountInfoDto accountInfo = 9; PaymentRequestInfo paymentRequestInfo = 10; } message WithdrawViewModelExternalResponseDto { string uuid = 1; int64 partnerId = 2; string created = 3; string updated = 4; string createdBy = 5; string updatedBy = 6; optional string remark = 7; optional string errors = 8; AccountInfoDto accountInfo = 9; PaymentRequestInfo paymentRequestInfo = 10; } message AccountInfoDto { string accountUuid = 1; string email = 2; PaymentPersonalDetails personalDetails = 3; optional AccountManager accountManager = 4; TradingAccount tradingAccount = 5; PaymentLeadDetails leadDetails = 6; optional string country = 7; optional string branchUuid = 8; optional string parentTradingAccountUuid = 9; } message PaymentPersonalDetails { optional string firstname = 1; optional string lastname = 2; } message AccountManager { optional string uuid = 1; optional string email = 2; optional string name = 3; } message TradingAccount { string uuid = 1; string login = 2; string offerUuid = 3; } message PaymentLeadDetails { optional string source = 1; } message PaymentRequestInfo { FinancialDetails financialDetails = 1; PaymentGatewayDetails paymentGatewayDetails = 2; AdditionalInfo additionalInfo = 3; } message FinancialDetails { string status = 1; optional double amount = 2; optional double netAmount = 3; optional double conversionRate = 4; optional string conversionCurrency = 5; optional string paymentGatewayCurrency = 6; optional string tradingAccountCurrency = 7; } message PaymentGatewayDetails { optional string uuid = 1; optional string name = 2; optional CustomFields customFields = 3; optional string bankAddress = 4; optional string bankName = 5; optional string bankSwiftCode = 6; optional string paymentAccount = 7; optional string accountName = 8; } message CustomFields { map<string, string> fields = 1; } message AdditionalInfo { optional string walletAddress = 1; optional string reference = 2; optional string paymentId = 3; } message PBAccountInfo { optional string uuid = 1; optional string email = 2; optional string name = 3; optional string surname = 4; } message PBTimelineEventAccountInfo { string uuid = 1; string email = 2; string branchUuid = 3; optional string name = 4; optional string surname = 5; optional string accountManagerUuid = 6; } message PBTimelineEventResponseExternal { oneof msg { PBTimelineEvent timelineEvent = 1; bool heartbeat = 2; } } message PBTimelineEvent { string timestamp = 1; PBEventType eventType = 2; PBTimelineEventAccountInfo accountInfo = 3; oneof event_data { PBLoginEvent login = 4; PBDepositEvent deposit = 5; PBWithdrawalEvent withdrawal = 6; PBLeadAssignmentEvent leadAssignment = 7; PBTaskEvent task = 8; PBNoteEvent note = 9; } } message PBLoginEvent { string ipAddress = 1; } message PBDepositEvent { string depositUuid = 1; double amount = 2; string status = 3; } message PBWithdrawalEvent { string withdrawalUuid = 1; double amount = 2; string status = 3; } message PBLeadAssignmentRule { string uuid = 1; string name = 2; } message PBLeadAssignmentEvent { optional PBAccountInfo newManager = 1; optional PBLeadAssignmentRule leadAssignmentRule = 2; } message PBTaskEvent { string taskUuid = 1; string type = 2; optional PBAccountInfo assignedTo = 3; string content = 4; } message PBNoteEvent { string noteUuid = 1; string type = 2; string actionBy = 3; string content = 4; } message PBTimelineRequestExternal { repeated string accountEmails = 1; repeated string accountUuids = 2; repeated string branchUuids = 3; }
Was this section helpful?

What made this section unhelpful for you?

Base URL

Production:

Sandbox:

Was this section helpful?

What made this section unhelpful for you?