0x-relayer-registry icon indicating copy to clipboard operation
0x-relayer-registry copied to clipboard

Endpoint Clarification

Open AusIV opened this issue 7 years ago • 5 comments

I noticed a discrepancy between the way different relayers are listing their endpoints.

RadarRelay has "https://api.radarrelay.com/0x", OpenRelay has "https://api.openrelay.xyz", both of which expect you to append "/v0" before use, while Amadaeus Relay has "https://api.amadeusrelay.org/api/v0/" and Tokenlon has "https://mainnet-dexapi.tokenlon.im/v1", which both include the version number in the URL.

I was trying to make sure that OpenRelay is set up for v2. Without specifying the version number, our endpoint is still correct, but there seem to be some relayers who specify the version number in their URL and some who don't, so I was hoping that could be clarified.

AusIV avatar Sep 10 '18 22:09 AusIV

Yes, good flag -- 0x Connect takes either I believe, but we should standardize for purposes here. I'm in favor of having a mandatory version appended to the URL, which we can check for in the validation script.

Thoughts @BMillman19 @fragosti @fabioberger

tomhschmidt avatar Sep 13 '18 12:09 tomhschmidt

We do explicitly call this out in https://github.com/0xProject/standard-relayer-api#versioning, however we do not explicitly mention this is the auto-generated documentation http://sra-spec.s3-website-us-east-1.amazonaws.com/#operation/getAssetPairs (that we eventually want to integrate into the website). Although, it may be implied by all the example URLs which all have "v2" in them. I'll make sure to call out versioning in the auto-generated docs as well.

fragosti avatar Sep 13 '18 12:09 fragosti

At some point @tomhschmidt went through and took out the /v0/ from OpenRelay's endpoint address: https://github.com/0xProject/0x-relayer-registry/commit/d8b927b678d276b72a9811c93d8fee951d774b9d

In any case, I have a PR to mention our Kovan support, but I'm still not clear on whether I should list the /v0/ vs /v2/ endpoints given they were explicitly removed previously (we also support both concurrently).

AusIV avatar Sep 20 '18 21:09 AusIV

@AusIV you should keep v0 and v2, although I'm not sure why @tomhschmidt removed the version. The commit seems to imply something breaks?

fragosti avatar Sep 25 '18 14:09 fragosti

Cool -- let's standardize around including versions in the endpoint. I'll update the tests and existing relayer endpoints.

tomhschmidt avatar Sep 27 '18 00:09 tomhschmidt