how to create an exchange of two resources at a rate using Verse code

Could you please tell me how to create an exchange of two resources at a rate of one to two using Verse code, for example?