Stevegee is right.
Right after you connect with the API, immediately call nextValidId and save the number it gives you. Then, whenever you need an id (requesting quotes or placing orders), just increment the number by 1 (or by anything you want). As long as the id you use is greater than the last one used, you will be fine.
Ed
Right after you connect with the API, immediately call nextValidId and save the number it gives you. Then, whenever you need an id (requesting quotes or placing orders), just increment the number by 1 (or by anything you want). As long as the id you use is greater than the last one used, you will be fine.
Ed