Create a rule
POSThttps://api.sandbox.noah.com/v1/beta1/rule
Create a rule used to create automated responses to events.
Request
Header Parameters
Digitally signed JWT.
- application/json
Bodyrequired
Trigger objectrequired
Actions object[]required
2024-04-16T08:00:55Z
If True, a rule can be executed repeatedly. Default is False.
A string which must be unique each time a new transaction is created, like a UUID or operation sequence number. Request can be idempotently retried by using the same Nonce.
Possible values: non-empty
and <= 36 characters
dc879b38-494b-4de7-98a9-068703144328
Responses
- 200
- 400
- 401
- 500
Created rule
- application/json
- Schema
- Example (auto)
Schema
Trigger objectrequired
{
"Trigger": {
"Type": "DepositDestinationTrigger",
"Amount": "10.1",
"CryptoCurrency": "BTC",
"Network": "Bitcoin",
"CustomerID": "550e8400-e29b-41d4-a716-446655440000",
"RefundAddress": {
"Address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
},
"DepositAddress": {
"Address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
}
},
"ID": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Bad request
- application/json
- Schema
- Example (auto)
Schema
- InvalidMessage
- Unexpected
- ResourceNotFound
- Unauthorized
- Forbidden
- InsufficientBalance
Type of error:
InvalidMessage
A unique reference that identifies the specific occurrence of the problem
Action taking place which resulted in error.
Details about the error.
Extensions object
{
"Type": "InvalidMessage",
"Instance": "string",
"Action": "string",
"Detail": "string",
"Extensions": {
"Request": {},
"Features": {}
}
}
Client is not authorized to perform this action
- application/json
- Schema
- Example (auto)
Schema
- InvalidMessage
- Unexpected
- ResourceNotFound
- Unauthorized
- Forbidden
- InsufficientBalance
Type of error:
InvalidMessage
A unique reference that identifies the specific occurrence of the problem
Action taking place which resulted in error.
Details about the error.
Extensions object
{
"Type": "InvalidMessage",
"Instance": "string",
"Action": "string",
"Detail": "string",
"Extensions": {
"Request": {},
"Features": {}
}
}
Internal server error
- application/json
- Schema
- Example (auto)
Schema
- InvalidMessage
- Unexpected
- ResourceNotFound
- Unauthorized
- Forbidden
- InsufficientBalance
Type of error:
InvalidMessage
A unique reference that identifies the specific occurrence of the problem
Action taking place which resulted in error.
Details about the error.
Extensions object
{
"Type": "InvalidMessage",
"Instance": "string",
"Action": "string",
"Detail": "string",
"Extensions": {
"Request": {},
"Features": {}
}
}
Authorization: X-Api-Key
name: X-Api-Keytype: apiKeydescription: This security scheme requires an API Key to successfully authenticate.in: header
- curl
- go
- nodejs
- python
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://api.sandbox.noah.com/v1/beta1/rule' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Api-Key: <X-Api-Key>' \
-d '{
"Trigger": {
"Type": "DepositSourceTriggerInput",
"Conditions": [
{
"AmountConditions": [
{
"ComparisonOperator": "EQ",
"Value": "10.1"
}
],
"CryptoCurrency": "BTC",
"Network": "Ethereum"
}
],
"SourceAddress": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
"CustomerID": "550e8400-e29b-41d4-a716-446655440000"
},
"Actions": [
{
"Type": "SellActionInput",
"CryptoCurrency": "../CryptoCurrency",
"CryptoAuthorizedAmount": {
"Value": "../Amount",
"Operations": [
{
"Operator": "Add",
"Value": "../Value"
}
]
},
"FiatAmount": {
"Value": "../Amount",
"Operations": [
{
"Operator": "Add",
"Value": "../Value"
}
]
},
"FormSessionID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ExternalID": "string"
}
],
"Expiry": "2024-04-16T08:00:55Z",
"Permanent": true,
"Nonce": "dc879b38-494b-4de7-98a9-068703144328"
}'