Skip to main content
1 of 2

V basic question re syntax for c-lightning RPC commands

Okay, I seem to be stuck trying to get a relatively simple getroute command to execute.

getroute id msatoshi riskfactor [cltv] [fromid] [fuzzpercent] [exclude] [maxhops]

(1) Do I need to include all the elements above, or can I ignore the optional elements (which I understand to be the ones in square brackets) and rely on their default values? (2) If I can ignore the optional elements, how do I do that?

I thought the following would be enough, but I get an error message about cltv being expected: getroute 024...a67 1000000sat 10 exclude="687193x890x0/0, 687193x890x0/1"

I also think the exclude element above is wrong. How do I write the exclude array?

(I am using Spark wallet's RPC console, FYI.)

Thanks!