Rules API Overview
In the domain of financial services, establishing and adhering to a set of rules is paramount to ensure regulatory compliance, efficient operations, and risk management. Gravity's Rules API offers correspondents an interface to manage their unique business logic and compliance controls.
Why it Matters?
- Flexibility: It recognizes that every correspondent may have its business nuances. Whether it's a strategic decision or a regulatory compulsion, the Rules API empowers them to operate within their preferred framework.
- Central Governance: Gravity consults these rules before executing tasks for a correspondent. This ensures all actions are in line with the correspondent's preferences and requirements.
- Granularity: Rules can be specified at a granular level, from trading options to transfer limits, giving correspondents precise control.
Breaking Down the Rules
Group: Rules are organized into groups, each representing a set of related policies. For example, a group named "High Risk" may contain rules that restrict trading in volatile assets. Each group has a unique ID and a name. Once a group is created, correspondents can assign or bucket their customers into these groups. Customers in the same group will follow the same set of rules.
Trading: Rules related to trading activities, such as options, equities, and mutual funds. Correspondents can define policies like commission charges, margin trading, or trading restrictions.
- Options: Control over opening and closing trades, along with commission decisions.
- Equities: Rules governing equities trade, such as using unsettled cash, margin trades, or fractional trading.
- Mutual Funds: Policies related to mutual fund trades.
Transfers: Manage the permissions for different types of transfers like ACH or Wire. - Set limits on the amount and frequency of deposits and withdrawals. - Define the hold period for transferred amounts to ensure funds are settled before use or withdrawal.
By utilizing the Rules API, correspondents ensure their business processes and transactions seamlessly align with Gravity's operations, ensuring a streamlined and compliant experience for all stakeholders.
Create Group
Use this endpoint to create a group of rules for a correspondent.
Request Body
Parameter | Description | Type | Input |
---|---|---|---|
groupName | Name of the group | String | Required |
correspondentId | Unique ID for the correspondent | UUID | Required |
Success Response
{
"message": "Customer group created",
"createdAt": "2024-03-01T00:48:27.978Z",
"updatedAt": "2024-03-01T00:48:27.978Z",
"groupId": "93e339af-a0de-47d9-877b-8fd5f8bc71b4",
"groupName": "high risk"
}
Get All Groups
Use this endpoint to retrieve the all the customer groups associated with a correspondent.
Path Parameters
Parameter | Description | Type | Input |
---|---|---|---|
correspondentId | Unique ID for the correspondent | UUID | Required |
Success Response
[
{
"createdAt": "2024-03-01T00:48:27.978Z",
"updatedAt": "2024-03-01T00:48:27.978Z",
"groupId": "93e339af-a0de-47d9-877b-8fd5f8bc71b4",
"groupName": "high risk",
}
]
Get Rules
Use this endpoint to retrieve the rules associated with a correspondent.
Path Parameters
Parameter | Description | Type | Input |
---|---|---|---|
groupId | Unique ID for the groupId | UUID | Required |
Success Response
{
"createdAt": "2024-03-01T00:28:47.779Z",
"updatedAt": "2024-03-12T07:59:38.486Z",
"rulesId": "e42ff651-b8db-4c08-9686-59c753dc14fa",
"maxSources": 1,
"canAddSource": false,
"canArchiveSource": false,
"canOpenOptions": false,
"canCloseOptions": false,
"canChargeOptionsCommissions": false,
"optionsCommission": null,
"canOpenEquities": false,
"canCloseEquities": false,
"canAllowEquitiesFractions": false,
"canTradeEquitiesWithMargin": false,
"canChargeEquitiesCommissions": false,
"canTradeEquitiesWithUnsettledCash": false,
"equitiesCommission": null,
"canOpenMutualFunds": false,
"canCloseMutualFunds": false,
"canChargeMutualFundsCommissions": false,
"mutualFundsCommission": null,
"canOpenAccounts": false,
"canCloseAccounts": false,
"canFreezeAccounts": false,
"allowAchDeposits": true,
"allowAchWithdrawals": true,
"allowWireDeposits": true,
"allowWireWithdrawals": true,
"maxAchDeposit": 10000,
"maxAchWithdrawal": 10000,
"maxWireDeposit": 10000,
"maxWireWithdrawal": 10000,
"maxDepositPerDay": 25000,
"maxWithdrawalPerDay": 25000,
"depositsPerDay": 5,
"withdrawalsPerDay": 5,
"holdPeriod": 4,
"restrictedSymbols": ["string"]
}
Update Rules
Use this endpoint to update the rules associated with a correspondent. Each field is optional. Only the fields that need to be updated should be included in the request body.
Path Parameters
Parameter | Description | Type | Input |
---|---|---|---|
groupId | Unique ID for the groupId | UUID | Required |
Request Body
Request Body
{
"maxSources": 1312,
"canAddSource": true,
"canArchiveSource": true,
"canOpenOptions": false,
"canCloseOptions": false,
"canChargeOptionsCommissions": false,
"optionsCommission": null,
"canOpenEquities": false,
"canCloseEquities": false,
"canAllowEquitiesFractions": false,
"canTradeEquitiesWithMargin": false,
"canChargeEquitiesCommissions": false,
"canTradeEquitiesWithUnsettledCash": false,
"equitiesCommission": null,
"canOpenMutualFunds": false,
"canCloseMutualFunds": false,
"canChargeMutualFundsCommissions": false,
"mutualFundsCommission": null,
"canOpenAccounts": false,
"canCloseAccounts": false,
"canFreezeAccounts": false,
"allowAchDeposits": true,
"allowAchWithdrawals": true,
"allowWireDeposits": true,
"allowWireWithdrawals": true,
"maxAchDeposit": 10000,
"maxAchWithdrawal": 10000,
"maxWireDeposit": 10000,
"maxWireWithdrawal": 10000,
"maxDepositPerDay": 25000,
"maxWithdrawalPerDay": 25000,
"depositsPerDay": 5,
"withdrawalsPerDay": 5,
"holdPeriod": 4,
"restrictedSymbols": ["string"]
}
Success Response
{
"createdAt": "2024-03-01T00:28:47.779Z",
"updatedAt": "2024-04-09T05:34:27.620Z",
"rulesId": "e42ff651-b8db-4c08-9686-59c753dc14fa",
"maxSources": 1312,
"canAddSource": true,
"canArchiveSource": true,
"canOpenOptions": false,
"canCloseOptions": false,
"canChargeOptionsCommissions": false,
"optionsCommission": null,
"canOpenEquities": false,
"canCloseEquities": false,
"canAllowEquitiesFractions": false,
"canTradeEquitiesWithMargin": false,
"canChargeEquitiesCommissions": false,
"canTradeEquitiesWithUnsettledCash": false,
"equitiesCommission": null,
"canOpenMutualFunds": false,
"canCloseMutualFunds": false,
"canChargeMutualFundsCommissions": false,
"mutualFundsCommission": null,
"canOpenAccounts": false,
"canCloseAccounts": false,
"canFreezeAccounts": false,
"allowAchDeposits": true,
"allowAchWithdrawals": true,
"allowWireDeposits": true,
"allowWireWithdrawals": true,
"maxAchDeposit": 10000,
"maxAchWithdrawal": 10000,
"maxWireDeposit": 10000,
"maxWireWithdrawal": 10000,
"maxDepositPerDay": 25000,
"maxWithdrawalPerDay": 25000,
"depositsPerDay": 5,
"withdrawalsPerDay": 5,
"holdPeriod": 4,
"restrictedSymbols": ["string"]
}
Delete Rules
Use this endpoint to delete the rules associated with a customer group. Once the rules are deleted, all the customers associated with the group will be moved to the default group.
Path Parameters
Parameter | Description | Type | Input |
---|---|---|---|
groupId | Unique ID for the groupId | UUID | Required |
Success Response
{
"message": "Correspondent rules with groupId {groupId} deleted successfully"
}