Closed AlvinKimata closed 10 months ago
you can simply create contract like this: contract_options = { contract_type: "DIGITDIFF", currency: "USD", amount: 2, duration_unit: "t", duration: 5, symbol: "R_10", basis: "stake", barrier: "5", };
then after connecting to the api, use the api variable as follows: await api.contract(contract_options ) const buy = await contract.buy();
this would buy a DIGITDIFF contract with a duration of 5 ticks. barrier being the prediction you can use CALL (rise) and PUT(fall) contract_type
Thanks a lot @JamesK254 . It worked for me.
Can anyone suggest an approach to incorporate various trade types like "rise/fall" and "matches/differs" using the deriv API library? If you have any ideas, kindly share a code snippet or provide guidance on how to implement these trade types effectively. Your guidance on integrating these trade types would be much appreciated.