swap base and quote in api