Basics

Integrate StableXchange using gRPC

This section assumes you already know how to set up gRPC clients and work with them.

What is gRPC?

REST vs gRPCCopied!

Getting StartedCopied!

API KeyCopied!

You must generate an API key before making any request to the StableXchange server.

Get API Key

ProtobufCopied!

You can access the protobuf files from here

Protobuf Files

Use custom header x-stablexchange-api-key with your API key as the value when using REST.

    .........
    // Create metadata to be sent with the request.
	md := metadata.New(map[string]string{
		"header":    "some value",
		"x-stablexchange-grpc-key":   "xxxxxxxxxxxx", // replace this with your API key
		"another-header":        "another value",
	})

	// Attach the metadata to an outgoing context.
	ctx := metadata.NewOutgoingContext(context.Background(), md)
    // Connect to the gRPC server
    .......

URLCopied!

grpc.stablecoinxyz.com