Create DCA

Method:

Near Call create_dca

Params

Name
Type
Description

name

string

Name of the DCA

token_in

AccountId

Sell Token

token_out

AccountId

Buy Token

single_amount_in

U128

Number of single executions

start_time

u64

millisecond, for example: 1729580505000

interval_time

u64

millisecond, for example: 60000(1minute)

count

u16

dca execution times

lowest_price

u64

lowest execution price, price = token_in / token_out

highest_price

u64

highest execution price, price = token_in / token_out

slippage

u16

ref's slippage during swap, min:10, max:10000; 10->0.1%

Near Cli

near call deltadca.testnet create_dca '{"name":"","token_id":"","token_out":"","single_amount_in":"","start_time":123,"interval_time":123,"count":8,"lowest_price":123,"highest":123,"slippage":20}' --deposit=0.02 --accountId=zero.testnet

deposit 0.02Near: Mainly used for storage, excess will be returned directly

Event

Name: create_dca

Event Body:

DCA ID will be returned on Event.

Last updated