Skip to content

Commit

Permalink
Merge branch 'master' into ahmed/DAPI-853/feat--add-business-partner-…
Browse files Browse the repository at this point in the history
…terms
  • Loading branch information
ahmed-deriv authored Jan 20, 2025
2 parents a8cef99 + f981ef4 commit 38b5545
Show file tree
Hide file tree
Showing 12 changed files with 226 additions and 39 deletions.
63 changes: 37 additions & 26 deletions config/v3/buy/send.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,44 +73,46 @@
"description": "A valid contract-type",
"type": "string",
"enum": [
"MULTUP",
"MULTDOWN",
"UPORDOWN",
"EXPIRYRANGE",
"ONETOUCH",
"CALLE",
"LBHIGHLOW",
"ACCU",
"ASIAND",
"EXPIRYRANGEE",
"ASIANU",
"CALL",
"CALLE",
"CALLSPREAD",
"DIGITDIFF",
"DIGITEVEN",
"DIGITMATCH",
"DIGITODD",
"DIGITOVER",
"PUTE",
"DIGITUNDER",
"NOTOUCH",
"CALL",
"RANGE",
"EXPIRYMISS",
"EXPIRYMISSE",
"EXPIRYRANGE",
"EXPIRYRANGEE",
"LBFLOATCALL",
"LBFLOATPUT",
"DIGITODD",
"LBHIGHLOW",
"MULTDOWN",
"MULTUP",
"NOTOUCH",
"ONETOUCH",
"PUT",
"ASIANU",
"LBFLOATCALL",
"EXPIRYMISSE",
"EXPIRYMISS",
"DIGITEVEN",
"TICKHIGH",
"TICKLOW",
"PUTE",
"PUTSPREAD",
"RANGE",
"RESETCALL",
"RESETPUT",
"CALLSPREAD",
"PUTSPREAD",
"RUNHIGH",
"RUNLOW",
"ACCU",
"VANILLALONGCALL",
"VANILLALONGPUT",
"SNOWDOWN",
"SNOWUP",
"TICKHIGH",
"TICKLOW",
"TURBOSLONG",
"TURBOSSHORT"
"TURBOSSHORT",
"UPORDOWN",
"VANILLALONGCALL",
"VANILLALONGPUT"
]
},
"currency": {
Expand Down Expand Up @@ -192,6 +194,15 @@
"type": "string",
"pattern": "^\\w{2,30}$"
},
"trade_risk_profile": {
"description": "[For Snowball only] The trade risk profile for Snowball trade types.",
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"trading_period_start": {
"description": "[Optional] An epoch value of a predefined trading period start time",
"type": "integer",
Expand Down
26 changes: 26 additions & 0 deletions config/v3/contracts_for/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@
2
]
},
"duration_choices": {
"description": "[Only for Snowball] Available contract durations in seconds.",
"type": "array",
"items": {
"type": "integer",
"examples": [
300,
600,
1200
]
},
"minItems": 1
},
"exchange_name": {
"description": "Name of exchange",
"type": "string",
Expand Down Expand Up @@ -271,6 +284,19 @@
"random_index"
]
},
"trade_risk_profile_choices": {
"description": "[Only for Snowball] Available risk profile options.",
"type": "array",
"items": {
"type": "string",
"examples": [
"low",
"medium",
"high"
]
},
"minItems": 1
},
"trading_period": {
"description": "A hash of predefined trading period",
"type": "object"
Expand Down
4 changes: 4 additions & 0 deletions config/v3/new_account_virtual/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
"description": "Email of the new virtual-money account",
"type": "string"
},
"login_code": {
"description": "[Optional] One-time code for passwordless login, valid for 1 minute",
"type": "string"
},
"oauth_token": {
"description": "Oauth token for the client's login session (so that the user may be logged in immediately)",
"type": "string"
Expand Down
2 changes: 1 addition & 1 deletion config/v3/new_partner_account/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"last_name": "Pan",
"partner_type": "individual",
"phone": "+10023456789",
"provider": "dynamicworks",
"provider": "myaffiliate",
"residence": "au",
"salutation": "Mr",
"secret_answer": "Jones",
Expand Down
40 changes: 40 additions & 0 deletions config/v3/proposal/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@
2.123
]
},
"caution_price": {
"description": "The caution price for the Snowball contract. Breaching this price will reset the coupons accrued to 0.",
"type": "string",
"pattern": "^[+-]?[0-9]+\\.?[0-9]*$",
"examples": [
"10001.2"
]
},
"coupon_rate": {
"description": "The coupon rate for the Snowball contract at which the stake will grow for each coupon accrued.",
"type": "string",
"pattern": "^[+-]?[0-9]+\\.?[0-9]*$",
"examples": [
"0.0132"
]
},
"high_barrier": {
"description": "High barrier calculated based on current spot",
"type": "string",
Expand Down Expand Up @@ -134,6 +150,21 @@
"1.00"
]
},
"num_of_coupons": {
"description": "The maximum number of coupons available for the Snowball contract.",
"type": "integer",
"examples": [
5
]
},
"profit_price": {
"description": "The profit price for the Snowball contract. Breaching this price will close the contract immediately.",
"type": "string",
"pattern": "^[+-]?[0-9]+\\.?[0-9]*$",
"examples": [
"10005.2"
]
},
"tick_size_barrier": {
"description": "Tick size barrier for Accumulator contracts",
"type": "number",
Expand All @@ -157,6 +188,15 @@
50
]
}
},
"trade_risk_profile": {
"description": "The trade risk profile for the Snowball contract.",
"type": "string",
"enum": [
"low",
"medium",
"high"
]
}
}
},
Expand Down
11 changes: 11 additions & 0 deletions config/v3/proposal/send.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
"TICKLOW",
"RESETCALL",
"RESETPUT",
"SNOWDOWN",
"SNOWUP",
"CALLSPREAD",
"PUTSPREAD",
"RUNHIGH",
Expand Down Expand Up @@ -187,6 +189,15 @@
"type": "string",
"pattern": "^\\w{2,30}$"
},
"trade_risk_profile": {
"description": "[Only for Snowball] The trade risk profile for the Snowball contract. Higher risk profile offers higher coupon rate at the expense of higher probability of breaching caution price",
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"trading_period_start": {
"description": "[Optional] Required only for multi-barrier trading. Defines the epoch value of the trading period start time.",
"type": "integer"
Expand Down
47 changes: 47 additions & 0 deletions config/v3/proposal_open_contract/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@
}
}
},
"caution_price": {
"description": "The caution price for the Snowball contract. Breaching this price will reset the coupons accrued to 0.",
"type": "string",
"pattern": "^[+-]?[0-9]+\\.?[0-9]*$",
"examples": [
"10001.2"
]
},
"commision": {
"description": "Commission in payout currency amount.",
"type": [
Expand All @@ -237,6 +245,21 @@
"PUT"
]
},
"coupon_collection_epochs": {
"description": "The epoch times at which the coupons will be accrued for the Snowball contract.",
"type": "array",
"items": {
"type": "integer"
}
},
"coupon_rate": {
"description": "The coupon rate for the Snowball contract at which the stake will grow for each coupon accrued.",
"type": "string",
"pattern": "^[+-]?[0-9]+\\.?[0-9]*$",
"examples": [
"0.0132"
]
},
"currency": {
"description": "The currency code of the contract.",
"type": "string",
Expand Down Expand Up @@ -631,6 +654,13 @@
"description": "[Only for lookback trades] Multiplier applies when calculating the final payoff for each type of lookback. e.g. (Exit spot - Lowest historical price) * multiplier = Payout",
"type": "number"
},
"num_of_coupons": {
"description": "The maximum number of coupons available for the Snowball contract.",
"type": "integer",
"examples": [
5
]
},
"payout": {
"description": "Payout value of the contract.",
"type": "number",
Expand All @@ -646,6 +676,14 @@
"description": "Profit in percentage.",
"type": "number"
},
"profit_price": {
"description": "The profit price for the Snowball contract. Breaching this price will close the contract immediately.",
"type": "string",
"pattern": "^[+-]?[0-9]+\\.?[0-9]*$",
"examples": [
"10005.2"
]
},
"purchase_time": {
"description": "Epoch of purchase time, will be same as `date_start` for all contracts except forward starting contracts.",
"type": "integer"
Expand Down Expand Up @@ -775,6 +813,15 @@
}
}
},
"trade_risk_profile": {
"description": "The trade risk profile for the Snowball contract.",
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"transaction_ids": {
"title": "Transaction ids for contract",
"description": "Every contract has buy and sell transaction ids, i.e. when you purchase a contract we associate it with buy transaction id, and if contract is already sold we associate that with sell transaction id.",
Expand Down
3 changes: 2 additions & 1 deletion config/v3/transfer_between_accounts/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"paymentagent",
"paymentagent_client",
"standard",
"virtual"
"virtual",
"partner"
]
},
"balance": {
Expand Down
3 changes: 3 additions & 0 deletions i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -1121,5 +1121,8 @@
},
"and General Business Partners": {
"message": "and General Business Partners"
},
"Copied": {
"message": "Copied"
}
}
3 changes: 3 additions & 0 deletions i18n/fr/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -1121,5 +1121,8 @@
},
"and General Business Partners": {
"message": "et partenaires commerciaux généraux"
},
"Copied": {
"message": "Copié"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,38 @@
.copyTextIcon {
margin-left: 8px;
margin-top: 4px;
position: relative;
}

.tooltip {
position: absolute;
background-color: rgba(0, 0, 0, 0.75);
color: white;
padding: 5px 10px;
border-radius: 4px;
top: 100%;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
white-space: nowrap;
font-size: 12px;
transition: opacity 0.3s ease, visibility 0.3s ease;
opacity: 0;
visibility: hidden;

&::after {
content: '';
position: absolute;
top: -6px;
left: 50%;
transform: translateX(-50%);
border-width: 0 6px 6px;
border-style: solid;
border-color: transparent transparent rgba(0, 0, 0, 0.75);
}
}

.tooltip.visible {
opacity: 1;
visibility: visible;
}
Loading

0 comments on commit 38b5545

Please sign in to comment.