0xsequence / sequence-unreal

Sequence Unreal SDK
Apache License 2.0
4 stars 5 forks source link

Integrate Swap APIs #193

Open andygruening opened 1 month ago

andygruening commented 1 month ago

The following APIs are used to get the swap quotes: https://api.sequence.app/rpc/API/GetSwapPrices https://api.sequence.app/rpc/API/GetSwapQuote

BellringerQuinn commented 1 month ago

@andygruening would you mind adding the related API docs or ridl files here?

BellringerQuinn commented 1 week ago

Ridl file: https://github.com/0xsequence/stack/blob/master/api/proto/api.ridl#L867

Unity Implementation: https://github.com/0xsequence/sequence-unity/pull/205/files Main Unity implementation file: https://github.com/0xsequence/sequence-unity/pull/205/files#diff-a2baae059a39226b69a0243a7fada7b153ceb93f918e1871b8b26d242a0374b2

Important: we (Sequence) can be punished by our service provider for having too many unfulfilled GetSwapQuote requests. Please make sure to check that the user has sufficient funds to fulfill a SwapQuote prior to making the request by first GetSwapPrice and querying the Indexer - see AssertWeHaveSufficientBalance